sig
module Std :
sig
module Config : sig val pkg_version : string end
type 'a printer = Format.formatter -> 'a -> unit
module type Printable =
sig
type t
val to_string : Bap.Std.Printable.t -> string
val str : unit -> Bap.Std.Printable.t -> string
val pps : unit -> Bap.Std.Printable.t -> string
val ppo : Pervasives.out_channel -> Bap.Std.Printable.t -> unit
val pp_seq :
Format.formatter ->
Bap.Std.Printable.t Core_kernel.Std.Sequence.t -> unit
val pp : Format.formatter -> t -> unit
end
module type Regular =
sig
type t
val to_string : t -> string
val str : unit -> t -> string
val pps : unit -> t -> string
val ppo : out_channel -> t -> unit
val pp_seq :
Format.formatter -> t Core_kernel.Std.Sequence.t -> unit
val pp : Format.formatter -> t -> unit
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val comparator :
(t, comparator_witness) Core_kernel.Comparator.comparator
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness) Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked : (Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter : 'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi : 'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a | `Right of 'a | `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness) Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list -> init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked : (Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi : 'a list t -> key:Key.t -> data:'a -> 'a list t
val change : 'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter : 'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi : 'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t -> init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t -> init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter : 'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct : ('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t * [ `Left of 'a | `Right of 'a | `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
val bin_size_t : ('a, 'a t) Bin_prot.Size.sizer1
val bin_write_t : ('a, 'a t) Bin_prot.Write.writer1
val bin_read_t : ('a, 'a t) Bin_prot.Read.reader1
val __bin_read_t__ : ('a, int -> 'a t) Bin_prot.Read.reader1
val bin_writer_t : ('a, 'a t) Bin_prot.Type_class.S1.writer
val bin_reader_t : ('a, 'a t) Bin_prot.Type_class.S1.reader
val bin_t : ('a, 'a t) Bin_prot.Type_class.S1.t
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness) Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum -> f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map : t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t = (Elt.t, Elt.comparator_witness) Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t -> init:'accum -> f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map : t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> Elt.t -> [ `Continue of 'b | `Stop of 'b ]) -> 'b
val fold_right : t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by : t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array : Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t -> f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
val bin_size_t : t Bin_prot.Size.sizer
val bin_write_t : t Bin_prot.Write.writer
val bin_read_t : t Bin_prot.Read.reader
val __bin_read_t__ : (int -> t) Bin_prot.Read.reader
val bin_writer_t : t Bin_prot.Type_class.writer
val bin_reader_t : t Bin_prot.Type_class.reader
val bin_t : t Bin_prot.Type_class.t
end
val hash : t -> int
val hashable : t Core_kernel.Std.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Std.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable : key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list -> ('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list, ('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list | `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) -> 'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) -> 'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key : ('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c -> f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ -> f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ -> f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ -> f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one : ('a, 'b list) t_ -> 'a key_ -> unit
val replace : ('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set : ('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ -> key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> unit Core_kernel.Or_error.t
val add_exn : ('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ -> 'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ -> key:'a key_ -> data:'b -> unit
val remove_multi : ('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c, ('a, 'b) t_ -> f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter : ('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ -> 'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) -> if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove : ('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals : ('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace : ('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ -> ('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ -> ('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr : ?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
val bin_size_t : ('a, 'a t) Bin_prot.Size.sizer1
val bin_write_t : ('a, 'a t) Bin_prot.Write.writer1
val bin_read_t : ('a, 'a t) Bin_prot.Read.reader1
val __bin_read_t__ : ('a, int -> 'a t) Bin_prot.Read.reader1
val bin_writer_t : ('a, 'a t) Bin_prot.Type_class.S1.writer
val bin_reader_t : ('a, 'a t) Bin_prot.Type_class.S1.reader
val bin_t : ('a, 'a t) Bin_prot.Type_class.S1.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val bin_size_t : t Bin_prot.Size.sizer
val bin_write_t : t Bin_prot.Write.writer
val bin_read_t : t Bin_prot.Read.reader
val __bin_read_t__ : (int -> t) Bin_prot.Read.reader
val bin_writer_t : t Bin_prot.Type_class.writer
val bin_reader_t : t Bin_prot.Type_class.reader
val bin_t : t Bin_prot.Type_class.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t -> init:'accum -> f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map : 'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt : 'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt : 'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t -> Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove : 'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace : 'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri : 'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t -> init:'b -> f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
end
module type Opaque =
sig
type t
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness) Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness) Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked : (Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter : 'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi : 'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a | `Right of 'a | `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness) Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list -> init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked : (Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi : 'a list t -> key:Key.t -> data:'a -> 'a list t
val change : 'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter : 'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi : 'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t -> init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t -> init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter : 'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct : ('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t * [ `Left of 'a | `Right of 'a | `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness) Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum -> f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map : t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t = (Elt.t, Elt.comparator_witness) Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t -> init:'accum -> f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map : t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> Elt.t -> [ `Continue of 'b | `Stop of 'b ]) -> 'b
val fold_right : t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by : t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array : Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t -> f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable : t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl = ('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable : key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list -> ('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list, ('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list | `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) -> 'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) -> 'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key : ('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c -> f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ -> f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ -> f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ -> f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one : ('a, 'b list) t_ -> 'a key_ -> unit
val replace : ('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set : ('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ -> key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> unit Core_kernel.Or_error.t
val add_exn : ('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ -> 'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ -> key:'a key_ -> data:'b -> unit
val remove_multi : ('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c, ('a, 'b) t_ -> f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter : ('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ -> 'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) -> if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove : ('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals : ('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace : ('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ -> ('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ -> ('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr : ?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t -> init:'accum -> f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map : 'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt : 'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt : 'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t -> Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove : 'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace : 'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri : 'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t -> init:'b -> f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
end
module type Integer =
sig
type t
val zero : Bap.Std.Integer.t
val one : Bap.Std.Integer.t
val succ : Bap.Std.Integer.t -> Bap.Std.Integer.t
val pred : Bap.Std.Integer.t -> Bap.Std.Integer.t
val abs : Bap.Std.Integer.t -> Bap.Std.Integer.t
val neg : Bap.Std.Integer.t -> Bap.Std.Integer.t
val add :
Bap.Std.Integer.t -> Bap.Std.Integer.t -> Bap.Std.Integer.t
val sub :
Bap.Std.Integer.t -> Bap.Std.Integer.t -> Bap.Std.Integer.t
val mul :
Bap.Std.Integer.t -> Bap.Std.Integer.t -> Bap.Std.Integer.t
val div :
Bap.Std.Integer.t -> Bap.Std.Integer.t -> Bap.Std.Integer.t
val modulo :
Bap.Std.Integer.t -> Bap.Std.Integer.t -> Bap.Std.Integer.t
val lnot : Bap.Std.Integer.t -> Bap.Std.Integer.t
val logand :
Bap.Std.Integer.t -> Bap.Std.Integer.t -> Bap.Std.Integer.t
val logor :
Bap.Std.Integer.t -> Bap.Std.Integer.t -> Bap.Std.Integer.t
val logxor :
Bap.Std.Integer.t -> Bap.Std.Integer.t -> Bap.Std.Integer.t
val lshift :
Bap.Std.Integer.t -> Bap.Std.Integer.t -> Bap.Std.Integer.t
val rshift :
Bap.Std.Integer.t -> Bap.Std.Integer.t -> Bap.Std.Integer.t
val arshift :
Bap.Std.Integer.t -> Bap.Std.Integer.t -> Bap.Std.Integer.t
val ( ~- ) : Bap.Std.Integer.t -> Bap.Std.Integer.t
val ( + ) :
Bap.Std.Integer.t -> Bap.Std.Integer.t -> Bap.Std.Integer.t
val ( - ) :
Bap.Std.Integer.t -> Bap.Std.Integer.t -> Bap.Std.Integer.t
val ( * ) :
Bap.Std.Integer.t -> Bap.Std.Integer.t -> Bap.Std.Integer.t
val ( / ) :
Bap.Std.Integer.t -> Bap.Std.Integer.t -> Bap.Std.Integer.t
val ( mod ) :
Bap.Std.Integer.t -> Bap.Std.Integer.t -> Bap.Std.Integer.t
val ( land ) :
Bap.Std.Integer.t -> Bap.Std.Integer.t -> Bap.Std.Integer.t
val ( lor ) :
Bap.Std.Integer.t -> Bap.Std.Integer.t -> Bap.Std.Integer.t
val ( lxor ) :
Bap.Std.Integer.t -> Bap.Std.Integer.t -> Bap.Std.Integer.t
val ( lsl ) :
Bap.Std.Integer.t -> Bap.Std.Integer.t -> Bap.Std.Integer.t
val ( lsr ) :
Bap.Std.Integer.t -> Bap.Std.Integer.t -> Bap.Std.Integer.t
val ( asr ) :
Bap.Std.Integer.t -> Bap.Std.Integer.t -> Bap.Std.Integer.t
end
module Monad :
sig
module type Basic = Core_kernel.Std.Monad.Basic
module type Basic2 = Core_kernel.Std.Monad.Basic2
module type Infix = Core_kernel.Std.Monad.Infix
module type Infix2 = Core_kernel.Std.Monad.Infix2
module type S = Core_kernel.Std.Monad.S
module type S2 = Core_kernel.Std.Monad.S2
module type State =
sig
type (+'a, 's) t
val ( >>= ) : ('a, 'd) t -> ('a -> ('b, 'd) t) -> ('b, 'd) t
val ( >>| ) : ('a, 'd) t -> ('a -> 'b) -> ('b, 'd) t
module Monad_infix :
sig
val ( >>= ) :
('a, 'd) t -> ('a -> ('b, 'd) t) -> ('b, 'd) t
val ( >>| ) : ('a, 'd) t -> ('a -> 'b) -> ('b, 'd) t
end
val bind : ('a, 'd) t -> ('a -> ('b, 'd) t) -> ('b, 'd) t
val return : 'a -> ('a, 'b) t
val map : ('a, 'd) t -> f:('a -> 'b) -> ('b, 'd) t
val join : (('a, 'd) t, 'd) t -> ('a, 'd) t
val ignore_m : ('a, 'd) t -> (unit, 'd) t
val all : ('a, 'd) t list -> ('a list, 'd) t
val all_ignore : (unit, 'd) t list -> (unit, 'd) t
val put : 's -> (unit, 's) Bap.Std.Monad.State.t
val get : unit -> ('s, 's) Bap.Std.Monad.State.t
val gets : ('s -> 'r) -> ('r, 's) Bap.Std.Monad.State.t
val modify :
('a, 's) Bap.Std.Monad.State.t ->
('s -> 's) -> ('a, 's) Bap.Std.Monad.State.t
val run : ('a, 's) Bap.Std.Monad.State.t -> 's -> 'a * 's
val eval : ('a, 's) Bap.Std.Monad.State.t -> 's -> 'a
val exec : ('a, 's) Bap.Std.Monad.State.t -> 's -> 's
end
module Make :
functor (M : Basic) ->
sig
val ( >>= ) : 'a M.t -> ('a -> 'b M.t) -> 'b M.t
val ( >>| ) : 'a M.t -> ('a -> 'b) -> 'b M.t
module Monad_infix :
sig
val ( >>= ) : 'a M.t -> ('a -> 'b M.t) -> 'b M.t
val ( >>| ) : 'a M.t -> ('a -> 'b) -> 'b M.t
end
val bind : 'a M.t -> ('a -> 'b M.t) -> 'b M.t
val return : 'a -> 'a M.t
val map : 'a M.t -> f:('a -> 'b) -> 'b M.t
val join : 'a M.t M.t -> 'a M.t
val ignore_m : 'a M.t -> unit M.t
val all : 'a M.t list -> 'a list M.t
val all_ignore : unit M.t list -> unit M.t
end
module Make2 :
functor (M : Basic2) ->
sig
val ( >>= ) :
('a, 'd) M.t -> ('a -> ('b, 'd) M.t) -> ('b, 'd) M.t
val ( >>| ) : ('a, 'd) M.t -> ('a -> 'b) -> ('b, 'd) M.t
module Monad_infix :
sig
val ( >>= ) :
('a, 'd) M.t -> ('a -> ('b, 'd) M.t) -> ('b, 'd) M.t
val ( >>| ) : ('a, 'd) M.t -> ('a -> 'b) -> ('b, 'd) M.t
end
val bind :
('a, 'd) M.t -> ('a -> ('b, 'd) M.t) -> ('b, 'd) M.t
val return : 'a -> ('a, 'b) M.t
val map : ('a, 'd) M.t -> f:('a -> 'b) -> ('b, 'd) M.t
val join : (('a, 'd) M.t, 'd) M.t -> ('a, 'd) M.t
val ignore_m : ('a, 'd) M.t -> (unit, 'd) M.t
val all : ('a, 'd) M.t list -> ('a list, 'd) M.t
val all_ignore : (unit, 'd) M.t list -> (unit, 'd) M.t
end
module State : State
end
module Regular :
sig
module Make :
functor
(M : sig
type t
val pp : Format.formatter -> t -> unit
val hash : Bap.Std.Regular.Make.t -> int
val module_name : string option
end) ->
sig
val to_string : M.t -> string
val str : unit -> M.t -> string
val pps : unit -> M.t -> string
val ppo : out_channel -> M.t -> unit
val pp_seq :
Format.formatter -> M.t Core_kernel.Std.Sequence.t -> unit
val pp : Format.formatter -> M.t -> unit
val ( >= ) : M.t -> M.t -> bool
val ( <= ) : M.t -> M.t -> bool
val ( = ) : M.t -> M.t -> bool
val ( > ) : M.t -> M.t -> bool
val ( < ) : M.t -> M.t -> bool
val ( <> ) : M.t -> M.t -> bool
val equal : M.t -> M.t -> bool
val compare : M.t -> M.t -> int
val min : M.t -> M.t -> M.t
val max : M.t -> M.t -> M.t
val ascending : M.t -> M.t -> int
val descending : M.t -> M.t -> int
val between : M.t -> low:M.t -> high:M.t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : M.t -> M.t -> bool
val ( <= ) : M.t -> M.t -> bool
val ( = ) : M.t -> M.t -> bool
val ( > ) : M.t -> M.t -> bool
val ( < ) : M.t -> M.t -> bool
val ( <> ) : M.t -> M.t -> bool
val equal : M.t -> M.t -> bool
val compare : M.t -> M.t -> int
val min : M.t -> M.t -> M.t
val max : M.t -> M.t -> M.t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val validate_lbound :
min:M.t Core_kernel.Comparable_intf.bound ->
M.t Core_kernel.Validate.check
val validate_ubound :
max:M.t Core_kernel.Comparable_intf.bound ->
M.t Core_kernel.Validate.check
val validate_bound :
min:M.t Core_kernel.Comparable_intf.bound ->
max:M.t Core_kernel.Comparable_intf.bound ->
M.t Core_kernel.Validate.check
val comparator :
(M.t, comparator_witness) Core_kernel.Comparator.comparator
module Map :
sig
module Key :
sig
type t = M.t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a | `Right of 'a | `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi : 'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a | `Right of 'a | `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
val bin_size_t : ('a, 'a t) Bin_prot.Size.sizer1
val bin_write_t : ('a, 'a t) Bin_prot.Write.writer1
val bin_read_t : ('a, 'a t) Bin_prot.Read.reader1
val __bin_read_t__ :
('a, int -> 'a t) Bin_prot.Read.reader1
val bin_writer_t :
('a, 'a t) Bin_prot.Type_class.S1.writer
val bin_reader_t :
('a, 'a t) Bin_prot.Type_class.S1.reader
val bin_t : ('a, 'a t) Bin_prot.Type_class.S1.t
end
module Set :
sig
module Elt :
sig
type t = M.t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum -> f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map : t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t -> f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
val bin_size_t : t Bin_prot.Size.sizer
val bin_write_t : t Bin_prot.Write.writer
val bin_read_t : t Bin_prot.Read.reader
val __bin_read_t__ : (int -> t) Bin_prot.Read.reader
val bin_writer_t : t Bin_prot.Type_class.writer
val bin_reader_t : t Bin_prot.Type_class.reader
val bin_t : t Bin_prot.Type_class.t
end
val hash : M.t -> int
val hashable :
M.t Core_kernel.Std.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = M.t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Std.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list | `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) -> 'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) -> 'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c -> f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one : ('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set : ('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ -> key:'a key_ -> data:'b -> unit
val remove_multi : ('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c, ('a, 'b) t_ -> f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter : ('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ -> 'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove : ('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals : ('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr : ?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
val bin_size_t : ('a, 'a t) Bin_prot.Size.sizer1
val bin_write_t : ('a, 'a t) Bin_prot.Write.writer1
val bin_read_t : ('a, 'a t) Bin_prot.Read.reader1
val __bin_read_t__ :
('a, int -> 'a t) Bin_prot.Read.reader1
val bin_writer_t :
('a, 'a t) Bin_prot.Type_class.S1.writer
val bin_reader_t :
('a, 'a t) Bin_prot.Type_class.S1.reader
val bin_t : ('a, 'a t) Bin_prot.Type_class.S1.t
end
module Hash_set :
sig
type elt = M.t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val bin_size_t : t Bin_prot.Size.sizer
val bin_write_t : t Bin_prot.Write.writer
val bin_read_t : t Bin_prot.Read.reader
val __bin_read_t__ : (int -> t) Bin_prot.Read.reader
val bin_writer_t : t Bin_prot.Type_class.writer
val bin_reader_t : t Bin_prot.Type_class.reader
val bin_t : t Bin_prot.Type_class.t
end
module Hash_queue :
sig
module Key :
sig
type t = M.t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum -> f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map : 'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt : 'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt : 'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t -> Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove : 'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b -> f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
end
end
module Opaque :
sig
module Make :
functor
(S : sig type t val hash : Bap.Std.Opaque.Make.t -> int end) ->
sig
val ( >= ) : S.t -> S.t -> bool
val ( <= ) : S.t -> S.t -> bool
val ( = ) : S.t -> S.t -> bool
val ( > ) : S.t -> S.t -> bool
val ( < ) : S.t -> S.t -> bool
val ( <> ) : S.t -> S.t -> bool
val equal : S.t -> S.t -> bool
val min : S.t -> S.t -> S.t
val max : S.t -> S.t -> S.t
val ascending : S.t -> S.t -> int
val descending : S.t -> S.t -> int
val between : S.t -> low:S.t -> high:S.t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : S.t -> S.t -> bool
val ( <= ) : S.t -> S.t -> bool
val ( = ) : S.t -> S.t -> bool
val ( > ) : S.t -> S.t -> bool
val ( < ) : S.t -> S.t -> bool
val ( <> ) : S.t -> S.t -> bool
val equal : S.t -> S.t -> bool
val compare : S.t -> S.t -> int
val min : S.t -> S.t -> S.t
val max : S.t -> S.t -> S.t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(S.t, comparator_witness) Core_kernel.Comparator.comparator
val validate_lbound :
min:S.t Core_kernel.Comparable_intf.bound ->
S.t Core_kernel.Validate.check
val validate_ubound :
max:S.t Core_kernel.Comparable_intf.bound ->
S.t Core_kernel.Validate.check
val validate_bound :
min:S.t Core_kernel.Comparable_intf.bound ->
max:S.t Core_kernel.Comparable_intf.bound ->
S.t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = S.t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a | `Right of 'a | `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi : 'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a | `Right of 'a | `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = S.t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum -> f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map : t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t -> f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : S.t -> int
val compare : S.t -> S.t -> int
val hashable : S.t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = S.t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list | `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) -> 'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) -> 'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c -> f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one : ('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set : ('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ -> key:'a key_ -> data:'b -> unit
val remove_multi : ('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c, ('a, 'b) t_ -> f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter : ('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ -> 'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove : ('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals : ('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr : ?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = S.t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = S.t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum -> f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map : 'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt : 'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt : 'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t -> Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove : 'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b -> f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
end
end
module Seq :
sig
type 'a t = 'a Core_kernel.Std.Sequence.t
type 'a sequence = 'a t
val mem : ?equal:('a -> 'a -> bool) -> 'a t -> 'a -> bool
val length : 'a t -> int
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t -> init:'accum -> f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map : 'a t -> f:('a -> 'b option) -> 'b option
val to_array : 'a t -> 'a array
val min_elt : 'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt : 'a t -> cmp:('a -> 'a -> int) -> 'a option
val ( >>= ) : 'a t -> ('a -> 'b t) -> 'b t
val ( >>| ) : 'a t -> ('a -> 'b) -> 'b t
module Monad_infix :
sig
val ( >>= ) : 'a t -> ('a -> 'b t) -> 'b t
val ( >>| ) : 'a t -> ('a -> 'b) -> 'b t
end
val bind : 'a t -> ('a -> 'b t) -> 'b t
val return : 'a -> 'a t
val map : 'a t -> f:('a -> 'b) -> 'b t
val join : 'a t t -> 'a t
val ignore_m : 'a t -> unit t
val all : 'a t list -> 'a list t
val all_ignore : unit t list -> unit t
val empty : 'a t
val next : 'a t -> ('a * 'a t) option
module Step :
sig
type ('a, 's) t =
('a, 's) Core_kernel.Sequence.Step.t =
Done
| Skip of 's
| Yield of 'a * 's
val sexp_of_t :
('a -> Sexplib.Sexp.t) ->
('s -> Sexplib.Sexp.t) -> ('a, 's) t -> Sexplib.Sexp.t
end
val unfold_step : init:'s -> f:('s -> ('a, 's) Step.t) -> 'a t
val unfold : init:'s -> f:('s -> ('a * 's) option) -> 'a t
val unfold_with :
'a t -> init:'s -> f:('s -> 'a -> ('b, 's) Step.t) -> 'b t
val nth : 'a t -> int -> 'a option
val nth_exn : 'a t -> int -> 'a
val mapi : 'a t -> f:(int -> 'a -> 'b) -> 'b t
val filteri : 'a t -> f:(int -> 'a -> bool) -> 'a t
val merge : 'a t -> 'a t -> cmp:('a -> 'a -> int) -> 'a t
val hd : 'a t -> 'a option
val hd_exn : 'a t -> 'a
val tl : 'a t -> 'a t option
val tl_eagerly_exn : 'a t -> 'a t
val findi : 'a t -> f:(int -> 'a -> bool) -> (int * 'a) option
val find_exn : 'a t -> f:('a -> bool) -> 'a
val append : 'a t -> 'a t -> 'a t
val concat : 'a t t -> 'a t
val concat_map : 'a t -> f:('a -> 'b t) -> 'b t
val concat_mapi : 'a t -> f:(int -> 'a -> 'b t) -> 'b t
val interleave : 'a t t -> 'a t
val zip : 'a t -> 'b t -> ('a * 'b) t
val zip_full :
'a t ->
'b t -> [ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] t
val iteri : 'a t -> f:(int -> 'a -> unit) -> unit
val foldi : 'a t -> f:(int -> 'b -> 'a -> 'b) -> init:'b -> 'b
val reduce_exn : 'a t -> f:('a -> 'a -> 'a) -> 'a
val reduce : 'a t -> f:('a -> 'a -> 'a) -> 'a option
val find_consecutive_duplicate :
'a t -> equal:('a -> 'a -> bool) -> ('a * 'a) option
val remove_consecutive_duplicates :
'a t -> equal:('a -> 'a -> bool) -> 'a t
val range :
?stride:int ->
?start:[ `exclusive | `inclusive ] ->
?stop:[ `exclusive | `inclusive ] -> int -> int -> int t
val init : int -> f:(int -> 'a) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi : 'a t -> f:(int -> 'a -> 'b option) -> 'b t
val filter_opt : 'a option t -> 'a t
val sub : 'a t -> pos:int -> len:int -> 'a t
val take : 'a t -> int -> 'a t
val drop : 'a t -> int -> 'a t
val drop_eagerly : 'a t -> int -> 'a t
val take_while : 'a t -> f:('a -> bool) -> 'a t
val drop_while : 'a t -> f:('a -> bool) -> 'a t
val drop_while_option :
'a t -> f:('a -> bool) -> ('a * 'a t) option
val split_n_eagerly : 'a t -> int -> 'a t * 'a t
val shift_right : 'a t -> 'a -> 'a t
val shift_right_with_list : 'a t -> 'a list -> 'a t
val shift_left : 'a t -> int -> 'a t
module Infix : sig val ( @ ) : 'a t -> 'a t -> 'a t end
val cartesian_product : 'a t -> 'b t -> ('a * 'b) t
val interleaved_cartesian_product : 'a t -> 'b t -> ('a * 'b) t
val intersperse : 'a t -> sep:'a -> 'a t
val cycle : 'a t -> 'a t
val repeat : 'a -> 'a t
val singleton : 'a -> 'a t
val delayed_fold :
'a t ->
init:'s ->
f:('s -> 'a -> k:('s -> 'r) -> 'r) -> finish:('s -> 'r) -> 'r
val to_list : 'a t -> 'a list
val to_list_rev : 'a t -> 'a list
val of_list : 'a list -> 'a t
val memoize : 'a t -> 'a t
val force_eagerly : 'a t -> 'a t
val bounded_length :
'a t -> at_most:int -> [ `Greater | `Is of int ]
val length_is_bounded_by : ?min:int -> ?max:int -> 'a t -> bool
module Generator :
sig
type ('a, 'd) t = ('a, 'd) Core_kernel.Sequence.Generator.t
val ( >>= ) : ('a, 'd) t -> ('a -> ('b, 'd) t) -> ('b, 'd) t
val ( >>| ) : ('a, 'd) t -> ('a -> 'b) -> ('b, 'd) t
module Monad_infix :
sig
val ( >>= ) :
('a, 'd) t -> ('a -> ('b, 'd) t) -> ('b, 'd) t
val ( >>| ) : ('a, 'd) t -> ('a -> 'b) -> ('b, 'd) t
end
val bind : ('a, 'd) t -> ('a -> ('b, 'd) t) -> ('b, 'd) t
val return : 'a -> ('a, 'b) t
val map : ('a, 'd) t -> f:('a -> 'b) -> ('b, 'd) t
val join : (('a, 'd) t, 'd) t -> ('a, 'd) t
val ignore_m : ('a, 'd) t -> (unit, 'd) t
val all : ('a, 'd) t list -> ('a list, 'd) t
val all_ignore : (unit, 'd) t list -> (unit, 'd) t
val yield : 'elt -> (unit, 'elt) t
val run : (unit, 'elt) t -> 'elt sequence
end
val sexp_of_t : ('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val filter : 'a Bap.Std.Seq.t -> f:('a -> bool) -> 'a Bap.Std.Seq.t
val compare :
('a -> 'b -> int) -> 'a Bap.Std.Seq.t -> 'b Bap.Std.Seq.t -> int
val of_array : 'a array -> 'a Bap.Std.Seq.t
val cons : 'a -> 'a Bap.Std.Seq.t -> 'a Bap.Std.Seq.t
val is_empty : 'a Bap.Std.Seq.t -> bool
val pp : 'a Bap.Std.printer -> 'a Bap.Std.Seq.t Bap.Std.printer
val pp_bools : bool Bap.Std.Seq.t Bap.Std.printer
val pp_chars : char Bap.Std.Seq.t Bap.Std.printer
val pp_floats : float Bap.Std.Seq.t Bap.Std.printer
val pp_ints : int Bap.Std.Seq.t Bap.Std.printer
val pp_strings : string Bap.Std.Seq.t Bap.Std.printer
end
type 'a seq = 'a Bap.Std.Seq.t
val ( ^:: ) : 'a -> 'a Bap.Std.seq -> 'a Bap.Std.seq
module type Trie =
sig
type 'a t
type key
val create : unit -> 'a Bap.Std.Trie.t
val add :
'a Bap.Std.Trie.t -> key:Bap.Std.Trie.key -> data:'a -> unit
val change :
'a Bap.Std.Trie.t ->
Bap.Std.Trie.key -> ('a option -> 'a option) -> unit
val find : 'a Bap.Std.Trie.t -> Bap.Std.Trie.key -> 'a option
val walk :
'a Bap.Std.Trie.t ->
Bap.Std.Trie.key -> init:'b -> f:('b -> 'a option -> 'b) -> 'b
val remove : 'a Bap.Std.Trie.t -> Bap.Std.Trie.key -> unit
val longest_match :
'a Bap.Std.Trie.t -> Bap.Std.Trie.key -> (int * 'a) option
val length : 'a Bap.Std.Trie.t -> int
val pp : 'a Bap.Std.printer -> 'a Bap.Std.Trie.t Bap.Std.printer
end
module Trie :
sig
module type Key =
sig
type t
type token
val length : Bap.Std.Trie.Key.t -> int
val nth_token :
Bap.Std.Trie.Key.t -> int -> Bap.Std.Trie.Key.token
val token_hash : Bap.Std.Trie.Key.token -> int
end
module Make :
functor (Key : Key) ->
sig
type 'a t
type key = Key.t
val create : unit -> 'a t
val add : 'a t -> key:key -> data:'a -> unit
val change : 'a t -> key -> ('a option -> 'a option) -> unit
val find : 'a t -> key -> 'a option
val walk :
'a t -> key -> init:'b -> f:('b -> 'a option -> 'b) -> 'b
val remove : 'a t -> key -> unit
val longest_match : 'a t -> key -> (int * 'a) option
val length : 'a t -> int
val pp : 'a printer -> 'a t printer
end
module type Token =
sig type t val hash : Bap.Std.Trie.Token.t -> int end
module Array :
sig
module Prefix :
functor (Tok : Token) ->
sig
type 'a t
type key = Tok.t array
val create : unit -> 'a t
val add : 'a t -> key:key -> data:'a -> unit
val change :
'a t -> key -> ('a option -> 'a option) -> unit
val find : 'a t -> key -> 'a option
val walk :
'a t ->
key -> init:'b -> f:('b -> 'a option -> 'b) -> 'b
val remove : 'a t -> key -> unit
val longest_match : 'a t -> key -> (int * 'a) option
val length : 'a t -> int
val pp : 'a printer -> 'a t printer
end
module Suffix :
functor (Tok : Token) ->
sig
type 'a t
type key = Tok.t array
val create : unit -> 'a t
val add : 'a t -> key:key -> data:'a -> unit
val change :
'a t -> key -> ('a option -> 'a option) -> unit
val find : 'a t -> key -> 'a option
val walk :
'a t ->
key -> init:'b -> f:('b -> 'a option -> 'b) -> 'b
val remove : 'a t -> key -> unit
val longest_match : 'a t -> key -> (int * 'a) option
val length : 'a t -> int
val pp : 'a printer -> 'a t printer
end
end
module String :
sig
module Prefix :
sig
type 'a t
type key = string
val create : unit -> 'a t
val add : 'a t -> key:key -> data:'a -> unit
val change :
'a t -> key -> ('a option -> 'a option) -> unit
val find : 'a t -> key -> 'a option
val walk :
'a t -> key -> init:'b -> f:('b -> 'a option -> 'b) -> 'b
val remove : 'a t -> key -> unit
val longest_match : 'a t -> key -> (int * 'a) option
val length : 'a t -> int
val pp : 'a printer -> 'a t printer
end
module Suffix :
sig
type 'a t
type key = string
val create : unit -> 'a t
val add : 'a t -> key:key -> data:'a -> unit
val change :
'a t -> key -> ('a option -> 'a option) -> unit
val find : 'a t -> key -> 'a option
val walk :
'a t -> key -> init:'b -> f:('b -> 'a option -> 'b) -> 'b
val remove : 'a t -> key -> unit
val longest_match : 'a t -> key -> (int * 'a) option
val length : 'a t -> int
val pp : 'a printer -> 'a t printer
end
end
end
type word
type addr = Bap.Std.word
module Size :
sig
type all = [ `r128 | `r16 | `r256 | `r32 | `r64 | `r8 ]
type 'a p = 'a constraint 'a = [< Bap.Std.Size.all ]
type t = Bap.Std.Size.all Bap.Std.Size.p
val of_int : int -> Bap.Std.Size.t Core_kernel.Std.Or_error.t
val of_int_exn : int -> Bap.Std.Size.t
val of_int_opt : int -> Bap.Std.Size.t option
val addr_of_int : int -> [ `r32 | `r64 ] Core_kernel.Std.Or_error.t
val addr_of_int_exn : int -> [ `r32 | `r64 ]
val addr_of_int_opt : int -> [ `r32 | `r64 ] option
val addr_of_word_size :
Core_kernel.Std.Word_size.t -> [ `r32 | `r64 ]
val word_of_addr_size :
[ `r32 | `r64 ] -> Core_kernel.Std.Word_size.t
val to_addr_size :
Bap.Std.Size.t -> [ `r32 | `r64 ] Core_kernel.Std.Or_error.t
val to_bits : [< Bap.Std.Size.all ] Bap.Std.Size.p -> int
val to_bytes : [< Bap.Std.Size.all ] Bap.Std.Size.p -> int
val to_string : t -> string
val str : unit -> t -> string
val pps : unit -> t -> string
val ppo : out_channel -> t -> unit
val pp_seq :
Format.formatter -> t Core_kernel.Std.Sequence.t -> unit
val pp : Format.formatter -> t -> unit
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val comparator :
(t, comparator_witness) Core_kernel.Comparator.comparator
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness) Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked : (Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter : 'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi : 'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a | `Right of 'a | `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness) Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list -> init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked : (Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi : 'a list t -> key:Key.t -> data:'a -> 'a list t
val change : 'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter : 'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi : 'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t -> init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t -> init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter : 'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct : ('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t * [ `Left of 'a | `Right of 'a | `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
val bin_size_t : ('a, 'a t) Bin_prot.Size.sizer1
val bin_write_t : ('a, 'a t) Bin_prot.Write.writer1
val bin_read_t : ('a, 'a t) Bin_prot.Read.reader1
val __bin_read_t__ : ('a, int -> 'a t) Bin_prot.Read.reader1
val bin_writer_t : ('a, 'a t) Bin_prot.Type_class.S1.writer
val bin_reader_t : ('a, 'a t) Bin_prot.Type_class.S1.reader
val bin_t : ('a, 'a t) Bin_prot.Type_class.S1.t
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness) Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum -> f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map : t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t = (Elt.t, Elt.comparator_witness) Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t -> init:'accum -> f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map : t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> Elt.t -> [ `Continue of 'b | `Stop of 'b ]) -> 'b
val fold_right : t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by : t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array : Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t -> f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
val bin_size_t : t Bin_prot.Size.sizer
val bin_write_t : t Bin_prot.Write.writer
val bin_read_t : t Bin_prot.Read.reader
val __bin_read_t__ : (int -> t) Bin_prot.Read.reader
val bin_writer_t : t Bin_prot.Type_class.writer
val bin_reader_t : t Bin_prot.Type_class.reader
val bin_t : t Bin_prot.Type_class.t
end
val hash : t -> int
val hashable : t Core_kernel.Std.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Std.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable : key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list -> ('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list, ('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list | `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) -> 'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) -> 'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key : ('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c -> f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ -> f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ -> f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ -> f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one : ('a, 'b list) t_ -> 'a key_ -> unit
val replace : ('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set : ('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ -> key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> unit Core_kernel.Or_error.t
val add_exn : ('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ -> 'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ -> key:'a key_ -> data:'b -> unit
val remove_multi : ('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c, ('a, 'b) t_ -> f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter : ('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ -> 'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) -> if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove : ('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals : ('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace : ('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ -> ('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ -> ('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr : ?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
val bin_size_t : ('a, 'a t) Bin_prot.Size.sizer1
val bin_write_t : ('a, 'a t) Bin_prot.Write.writer1
val bin_read_t : ('a, 'a t) Bin_prot.Read.reader1
val __bin_read_t__ : ('a, int -> 'a t) Bin_prot.Read.reader1
val bin_writer_t : ('a, 'a t) Bin_prot.Type_class.S1.writer
val bin_reader_t : ('a, 'a t) Bin_prot.Type_class.S1.reader
val bin_t : ('a, 'a t) Bin_prot.Type_class.S1.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val bin_size_t : t Bin_prot.Size.sizer
val bin_write_t : t Bin_prot.Write.writer
val bin_read_t : t Bin_prot.Read.reader
val __bin_read_t__ : (int -> t) Bin_prot.Read.reader
val bin_writer_t : t Bin_prot.Type_class.writer
val bin_reader_t : t Bin_prot.Type_class.reader
val bin_t : t Bin_prot.Type_class.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t -> init:'accum -> f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map : 'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt : 'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt : 'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t -> Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove : 'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace : 'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri : 'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t -> init:'b -> f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
end
type size = Bap.Std.Size.t
type addr_size = [ `r32 | `r64 ] Bap.Std.Size.p
type nat1 = int
module Bitvector :
sig
type t = Bap.Std.word
val to_string : t -> string
val str : unit -> t -> string
val pps : unit -> t -> string
val ppo : out_channel -> t -> unit
val pp_seq :
Format.formatter -> t Core_kernel.Std.Sequence.t -> unit
val pp : Format.formatter -> t -> unit
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val comparator :
(t, comparator_witness) Core_kernel.Comparator.comparator
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness) Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked : (Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter : 'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi : 'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a | `Right of 'a | `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness) Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list -> init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked : (Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi : 'a list t -> key:Key.t -> data:'a -> 'a list t
val change : 'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter : 'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi : 'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t -> init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t -> init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter : 'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct : ('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t * [ `Left of 'a | `Right of 'a | `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
val bin_size_t : ('a, 'a t) Bin_prot.Size.sizer1
val bin_write_t : ('a, 'a t) Bin_prot.Write.writer1
val bin_read_t : ('a, 'a t) Bin_prot.Read.reader1
val __bin_read_t__ : ('a, int -> 'a t) Bin_prot.Read.reader1
val bin_writer_t : ('a, 'a t) Bin_prot.Type_class.S1.writer
val bin_reader_t : ('a, 'a t) Bin_prot.Type_class.S1.reader
val bin_t : ('a, 'a t) Bin_prot.Type_class.S1.t
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness) Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum -> f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map : t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t = (Elt.t, Elt.comparator_witness) Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t -> init:'accum -> f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map : t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> Elt.t -> [ `Continue of 'b | `Stop of 'b ]) -> 'b
val fold_right : t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by : t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array : Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t -> f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
val bin_size_t : t Bin_prot.Size.sizer
val bin_write_t : t Bin_prot.Write.writer
val bin_read_t : t Bin_prot.Read.reader
val __bin_read_t__ : (int -> t) Bin_prot.Read.reader
val bin_writer_t : t Bin_prot.Type_class.writer
val bin_reader_t : t Bin_prot.Type_class.reader
val bin_t : t Bin_prot.Type_class.t
end
val hash : t -> int
val hashable : t Core_kernel.Std.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Std.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable : key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list -> ('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list, ('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list | `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) -> 'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) -> 'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key : ('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c -> f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ -> f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ -> f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ -> f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one : ('a, 'b list) t_ -> 'a key_ -> unit
val replace : ('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set : ('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ -> key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> unit Core_kernel.Or_error.t
val add_exn : ('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ -> 'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ -> key:'a key_ -> data:'b -> unit
val remove_multi : ('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c, ('a, 'b) t_ -> f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter : ('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ -> 'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) -> if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove : ('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals : ('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace : ('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ -> ('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ -> ('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr : ?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
val bin_size_t : ('a, 'a t) Bin_prot.Size.sizer1
val bin_write_t : ('a, 'a t) Bin_prot.Write.writer1
val bin_read_t : ('a, 'a t) Bin_prot.Read.reader1
val __bin_read_t__ : ('a, int -> 'a t) Bin_prot.Read.reader1
val bin_writer_t : ('a, 'a t) Bin_prot.Type_class.S1.writer
val bin_reader_t : ('a, 'a t) Bin_prot.Type_class.S1.reader
val bin_t : ('a, 'a t) Bin_prot.Type_class.S1.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val bin_size_t : t Bin_prot.Size.sizer
val bin_write_t : t Bin_prot.Write.writer
val bin_read_t : t Bin_prot.Read.reader
val __bin_read_t__ : (int -> t) Bin_prot.Read.reader
val bin_writer_t : t Bin_prot.Type_class.writer
val bin_reader_t : t Bin_prot.Type_class.reader
val bin_t : t Bin_prot.Type_class.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t -> init:'accum -> f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map : 'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt : 'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt : 'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t -> Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove : 'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace : 'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri : 'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t -> init:'b -> f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
val validate_positive : t Core_kernel.Validate.check
val validate_non_negative : t Core_kernel.Validate.check
val validate_negative : t Core_kernel.Validate.check
val validate_non_positive : t Core_kernel.Validate.check
val is_positive : t -> bool
val is_non_negative : t -> bool
val is_negative : t -> bool
val is_non_positive : t -> bool
val abs : t -> t
val neg : t -> t
val add : t -> t -> t
val sub : t -> t -> t
val mul : t -> t -> t
val div : t -> t -> t
val modulo : t -> t -> t
val lnot : t -> t
val logand : t -> t -> t
val logor : t -> t -> t
val logxor : t -> t -> t
val lshift : t -> t -> t
val rshift : t -> t -> t
val arshift : t -> t -> t
val ( ~- ) : t -> t
val ( + ) : t -> t -> t
val ( - ) : t -> t -> t
val ( * ) : t -> t -> t
val ( / ) : t -> t -> t
val ( mod ) : t -> t -> t
val ( land ) : t -> t -> t
val ( lor ) : t -> t -> t
val ( lxor ) : t -> t -> t
val ( lsl ) : t -> t -> t
val ( lsr ) : t -> t -> t
val ( asr ) : t -> t -> t
module Mono :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness) Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a | `Right of 'a | `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked : (Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter : 'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi : 'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a | `Right of 'a | `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map : t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness) Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum -> f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map : t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t -> f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
end
exception Width
type endian = LittleEndian | BigEndian
val of_string : string -> Bap.Std.Bitvector.t
val of_bool : bool -> Bap.Std.Bitvector.t
val of_int : width:int -> int -> Bap.Std.Bitvector.t
val of_int32 : ?width:int -> int32 -> Bap.Std.Bitvector.t
val of_int64 : ?width:int -> int64 -> Bap.Std.Bitvector.t
val b0 : Bap.Std.Bitvector.t
val b1 : Bap.Std.Bitvector.t
val one : int -> Bap.Std.Bitvector.t
val zero : int -> Bap.Std.Bitvector.t
val ones : int -> Bap.Std.Bitvector.t
val of_binary :
?width:int ->
Bap.Std.Bitvector.endian -> string -> Bap.Std.Bitvector.t
val to_int : Bap.Std.Bitvector.t -> int Core_kernel.Std.Or_error.t
val to_int32 :
Bap.Std.Bitvector.t -> int32 Core_kernel.Std.Or_error.t
val to_int64 :
Bap.Std.Bitvector.t -> int64 Core_kernel.Std.Or_error.t
val string_of_value : ?hex:bool -> Bap.Std.Bitvector.t -> string
val signed : Bap.Std.Bitvector.t -> Bap.Std.Bitvector.t
val is_zero : Bap.Std.Bitvector.t -> bool
val is_one : Bap.Std.Bitvector.t -> bool
val bitwidth : Bap.Std.Bitvector.t -> int
val extract :
?hi:int ->
?lo:int ->
Bap.Std.Bitvector.t ->
Bap.Std.Bitvector.t Core_kernel.Std.Or_error.t
val extract_exn :
?hi:int -> ?lo:int -> Bap.Std.Bitvector.t -> Bap.Std.Bitvector.t
val concat :
Bap.Std.Bitvector.t -> Bap.Std.Bitvector.t -> Bap.Std.Bitvector.t
val ( @. ) :
Bap.Std.Bitvector.t -> Bap.Std.Bitvector.t -> Bap.Std.Bitvector.t
val succ : Bap.Std.Bitvector.t -> Bap.Std.Bitvector.t
val pred : Bap.Std.Bitvector.t -> Bap.Std.Bitvector.t
val nsucc : Bap.Std.Bitvector.t -> int -> Bap.Std.Bitvector.t
val npred : Bap.Std.Bitvector.t -> int -> Bap.Std.Bitvector.t
val ( ++ ) : Bap.Std.Bitvector.t -> int -> Bap.Std.Bitvector.t
val ( -- ) : Bap.Std.Bitvector.t -> int -> Bap.Std.Bitvector.t
val to_bytes :
Bap.Std.Bitvector.t ->
Bap.Std.Bitvector.endian -> Bap.Std.Bitvector.t Bap.Std.seq
val to_chars :
Bap.Std.Bitvector.t ->
Bap.Std.Bitvector.endian -> char Bap.Std.seq
val to_bits :
Bap.Std.Bitvector.t ->
Bap.Std.Bitvector.endian -> bool Bap.Std.seq
module Int_err :
sig
val ( !$ ) :
Bap.Std.Bitvector.t ->
Bap.Std.Bitvector.t Core_kernel.Std.Or_error.t
val i1 :
Bap.Std.Bitvector.t ->
Bap.Std.Bitvector.t Core_kernel.Std.Or_error.t
val i4 :
Bap.Std.Bitvector.t ->
Bap.Std.Bitvector.t Core_kernel.Std.Or_error.t
val i8 :
Bap.Std.Bitvector.t ->
Bap.Std.Bitvector.t Core_kernel.Std.Or_error.t
val i16 :
Bap.Std.Bitvector.t ->
Bap.Std.Bitvector.t Core_kernel.Std.Or_error.t
val i32 :
Bap.Std.Bitvector.t ->
Bap.Std.Bitvector.t Core_kernel.Std.Or_error.t
val i64 :
Bap.Std.Bitvector.t ->
Bap.Std.Bitvector.t Core_kernel.Std.Or_error.t
val int :
int ->
Bap.Std.Bitvector.t ->
Bap.Std.Bitvector.t Core_kernel.Std.Or_error.t
val of_word_size :
Core_kernel.Std.Word_size.t ->
Bap.Std.Bitvector.t ->
Bap.Std.Bitvector.t Core_kernel.Std.Or_error.t
type t = t Core_kernel.Std.Or_error.t
val zero : t
val one : t
val succ : t -> t
val pred : t -> t
val abs : t -> t
val neg : t -> t
val add : t -> t -> t
val sub : t -> t -> t
val mul : t -> t -> t
val div : t -> t -> t
val modulo : t -> t -> t
val lnot : t -> t
val logand : t -> t -> t
val logor : t -> t -> t
val logxor : t -> t -> t
val lshift : t -> t -> t
val rshift : t -> t -> t
val arshift : t -> t -> t
val ( ~- ) : t -> t
val ( + ) : t -> t -> t
val ( - ) : t -> t -> t
val ( * ) : t -> t -> t
val ( / ) : t -> t -> t
val ( mod ) : t -> t -> t
val ( land ) : t -> t -> t
val ( lor ) : t -> t -> t
val ( lxor ) : t -> t -> t
val ( lsl ) : t -> t -> t
val ( lsr ) : t -> t -> t
val ( asr ) : t -> t -> t
val ( >>= ) :
'a Core_kernel.Std.Or_error.t ->
('a -> 'b Core_kernel.Std.Or_error.t) ->
'b Core_kernel.Std.Or_error.t
val ( >>| ) :
'a Core_kernel.Std.Or_error.t ->
('a -> 'b) -> 'b Core_kernel.Std.Or_error.t
end
module Int_exn :
sig
type t = t
val zero : t
val one : t
val succ : t -> t
val pred : t -> t
val abs : t -> t
val neg : t -> t
val add : t -> t -> t
val sub : t -> t -> t
val mul : t -> t -> t
val div : t -> t -> t
val modulo : t -> t -> t
val lnot : t -> t
val logand : t -> t -> t
val logor : t -> t -> t
val logxor : t -> t -> t
val lshift : t -> t -> t
val rshift : t -> t -> t
val arshift : t -> t -> t
val ( ~- ) : t -> t
val ( + ) : t -> t -> t
val ( - ) : t -> t -> t
val ( * ) : t -> t -> t
val ( / ) : t -> t -> t
val ( mod ) : t -> t -> t
val ( land ) : t -> t -> t
val ( lor ) : t -> t -> t
val ( lxor ) : t -> t -> t
val ( lsl ) : t -> t -> t
val ( lsr ) : t -> t -> t
val ( asr ) : t -> t -> t
end
module Trie :
sig
module Big :
sig
module Bits :
sig
type 'a t
type key = t
val create : unit -> 'a t
val add : 'a t -> key:key -> data:'a -> unit
val change :
'a t -> key -> ('a option -> 'a option) -> unit
val find : 'a t -> key -> 'a option
val walk :
'a t ->
key -> init:'b -> f:('b -> 'a option -> 'b) -> 'b
val remove : 'a t -> key -> unit
val longest_match : 'a t -> key -> (int * 'a) option
val length : 'a t -> int
val pp : 'a printer -> 'a t printer
end
module Bytes :
sig
type 'a t
type key = t
val create : unit -> 'a t
val add : 'a t -> key:key -> data:'a -> unit
val change :
'a t -> key -> ('a option -> 'a option) -> unit
val find : 'a t -> key -> 'a option
val walk :
'a t ->
key -> init:'b -> f:('b -> 'a option -> 'b) -> 'b
val remove : 'a t -> key -> unit
val longest_match : 'a t -> key -> (int * 'a) option
val length : 'a t -> int
val pp : 'a printer -> 'a t printer
end
end
module Little :
sig
module Bits :
sig
type 'a t
type key = t
val create : unit -> 'a t
val add : 'a t -> key:key -> data:'a -> unit
val change :
'a t -> key -> ('a option -> 'a option) -> unit
val find : 'a t -> key -> 'a option
val walk :
'a t ->
key -> init:'b -> f:('b -> 'a option -> 'b) -> 'b
val remove : 'a t -> key -> unit
val longest_match : 'a t -> key -> (int * 'a) option
val length : 'a t -> int
val pp : 'a printer -> 'a t printer
end
module Bytes :
sig
type 'a t
type key = t
val create : unit -> 'a t
val add : 'a t -> key:key -> data:'a -> unit
val change :
'a t -> key -> ('a option -> 'a option) -> unit
val find : 'a t -> key -> 'a option
val walk :
'a t ->
key -> init:'b -> f:('b -> 'a option -> 'b) -> 'b
val remove : 'a t -> key -> unit
val longest_match : 'a t -> key -> (int * 'a) option
val length : 'a t -> int
val pp : 'a printer -> 'a t printer
end
end
end
end
type endian = Bap.Std.Bitvector.endian = LittleEndian | BigEndian
module Word :
sig
type t = word
val to_string : t -> string
val str : unit -> t -> string
val pps : unit -> t -> string
val ppo : out_channel -> t -> unit
val pp_seq :
Format.formatter -> t Core_kernel.Std.Sequence.t -> unit
val pp : Format.formatter -> t -> unit
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness = Bitvector.comparator_witness
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val comparator :
(t, comparator_witness) Core_kernel.Comparator.comparator
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness) Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked : (Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter : 'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi : 'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a | `Right of 'a | `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness) Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list -> init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked : (Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi : 'a list t -> key:Key.t -> data:'a -> 'a list t
val change : 'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter : 'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi : 'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t -> init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t -> init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter : 'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct : ('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t * [ `Left of 'a | `Right of 'a | `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
val bin_size_t : ('a, 'a t) Bin_prot.Size.sizer1
val bin_write_t : ('a, 'a t) Bin_prot.Write.writer1
val bin_read_t : ('a, 'a t) Bin_prot.Read.reader1
val __bin_read_t__ : ('a, int -> 'a t) Bin_prot.Read.reader1
val bin_writer_t : ('a, 'a t) Bin_prot.Type_class.S1.writer
val bin_reader_t : ('a, 'a t) Bin_prot.Type_class.S1.reader
val bin_t : ('a, 'a t) Bin_prot.Type_class.S1.t
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness) Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum -> f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map : t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t = (Elt.t, Elt.comparator_witness) Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t -> init:'accum -> f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map : t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> Elt.t -> [ `Continue of 'b | `Stop of 'b ]) -> 'b
val fold_right : t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by : t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array : Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t -> f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
val bin_size_t : t Bin_prot.Size.sizer
val bin_write_t : t Bin_prot.Write.writer
val bin_read_t : t Bin_prot.Read.reader
val __bin_read_t__ : (int -> t) Bin_prot.Read.reader
val bin_writer_t : t Bin_prot.Type_class.writer
val bin_reader_t : t Bin_prot.Type_class.reader
val bin_t : t Bin_prot.Type_class.t
end
val hash : t -> int
val hashable : t Core_kernel.Std.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Std.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable : key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list -> ('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list, ('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list | `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) -> 'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) -> 'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key : ('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c -> f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ -> f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ -> f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ -> f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one : ('a, 'b list) t_ -> 'a key_ -> unit
val replace : ('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set : ('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ -> key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> unit Core_kernel.Or_error.t
val add_exn : ('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ -> 'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ -> key:'a key_ -> data:'b -> unit
val remove_multi : ('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c, ('a, 'b) t_ -> f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter : ('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ -> 'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) -> if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove : ('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals : ('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace : ('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ -> ('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ -> ('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr : ?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
val bin_size_t : ('a, 'a t) Bin_prot.Size.sizer1
val bin_write_t : ('a, 'a t) Bin_prot.Write.writer1
val bin_read_t : ('a, 'a t) Bin_prot.Read.reader1
val __bin_read_t__ : ('a, int -> 'a t) Bin_prot.Read.reader1
val bin_writer_t : ('a, 'a t) Bin_prot.Type_class.S1.writer
val bin_reader_t : ('a, 'a t) Bin_prot.Type_class.S1.reader
val bin_t : ('a, 'a t) Bin_prot.Type_class.S1.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val bin_size_t : t Bin_prot.Size.sizer
val bin_write_t : t Bin_prot.Write.writer
val bin_read_t : t Bin_prot.Read.reader
val __bin_read_t__ : (int -> t) Bin_prot.Read.reader
val bin_writer_t : t Bin_prot.Type_class.writer
val bin_reader_t : t Bin_prot.Type_class.reader
val bin_t : t Bin_prot.Type_class.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t -> init:'accum -> f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map : 'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt : 'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt : 'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t -> Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove : 'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace : 'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri : 'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t -> init:'b -> f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
val validate_positive : t Core_kernel.Validate.check
val validate_non_negative : t Core_kernel.Validate.check
val validate_negative : t Core_kernel.Validate.check
val validate_non_positive : t Core_kernel.Validate.check
val is_positive : t -> bool
val is_non_negative : t -> bool
val is_negative : t -> bool
val is_non_positive : t -> bool
val abs : t -> t
val neg : t -> t
val add : t -> t -> t
val sub : t -> t -> t
val mul : t -> t -> t
val div : t -> t -> t
val modulo : t -> t -> t
val lnot : t -> t
val logand : t -> t -> t
val logor : t -> t -> t
val logxor : t -> t -> t
val lshift : t -> t -> t
val rshift : t -> t -> t
val arshift : t -> t -> t
val ( ~- ) : t -> t
val ( + ) : t -> t -> t
val ( - ) : t -> t -> t
val ( * ) : t -> t -> t
val ( / ) : t -> t -> t
val ( mod ) : t -> t -> t
val ( land ) : t -> t -> t
val ( lor ) : t -> t -> t
val ( lxor ) : t -> t -> t
val ( lsl ) : t -> t -> t
val ( lsr ) : t -> t -> t
val ( asr ) : t -> t -> t
module Mono :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness) Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a | `Right of 'a | `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked : (Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter : 'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi : 'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a | `Right of 'a | `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map : t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness) Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum -> f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map : t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t -> f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
end
exception Width
type endian = endian = LittleEndian | BigEndian
val of_string : string -> t
val of_bool : bool -> t
val of_int : width:int -> int -> t
val of_int32 : ?width:int -> int32 -> t
val of_int64 : ?width:int -> int64 -> t
val b0 : t
val b1 : t
val one : int -> t
val zero : int -> t
val ones : int -> t
val of_binary : ?width:int -> endian -> string -> t
val to_int : t -> int Core_kernel.Std.Or_error.t
val to_int32 : t -> int32 Core_kernel.Std.Or_error.t
val to_int64 : t -> int64 Core_kernel.Std.Or_error.t
val string_of_value : ?hex:bool -> t -> string
val signed : t -> t
val is_zero : t -> bool
val is_one : t -> bool
val bitwidth : t -> int
val extract :
?hi:int -> ?lo:int -> t -> t Core_kernel.Std.Or_error.t
val extract_exn : ?hi:int -> ?lo:int -> t -> t
val concat : t -> t -> t
val ( @. ) : t -> t -> t
val succ : t -> t
val pred : t -> t
val nsucc : t -> int -> t
val npred : t -> int -> t
val ( ++ ) : t -> int -> t
val ( -- ) : t -> int -> t
val to_bytes : t -> endian -> t seq
val to_chars : t -> endian -> char seq
val to_bits : t -> endian -> bool seq
module Int_err :
sig
val ( !$ ) : t -> t Core_kernel.Std.Or_error.t
val i1 : t -> t Core_kernel.Std.Or_error.t
val i4 : t -> t Core_kernel.Std.Or_error.t
val i8 : t -> t Core_kernel.Std.Or_error.t
val i16 : t -> t Core_kernel.Std.Or_error.t
val i32 : t -> t Core_kernel.Std.Or_error.t
val i64 : t -> t Core_kernel.Std.Or_error.t
val int : int -> t -> t Core_kernel.Std.Or_error.t
val of_word_size :
Core_kernel.Std.Word_size.t ->
t -> t Core_kernel.Std.Or_error.t
type t = t Core_kernel.Std.Or_error.t
val zero : t
val one : t
val succ : t -> t
val pred : t -> t
val abs : t -> t
val neg : t -> t
val add : t -> t -> t
val sub : t -> t -> t
val mul : t -> t -> t
val div : t -> t -> t
val modulo : t -> t -> t
val lnot : t -> t
val logand : t -> t -> t
val logor : t -> t -> t
val logxor : t -> t -> t
val lshift : t -> t -> t
val rshift : t -> t -> t
val arshift : t -> t -> t
val ( ~- ) : t -> t
val ( + ) : t -> t -> t
val ( - ) : t -> t -> t
val ( * ) : t -> t -> t
val ( / ) : t -> t -> t
val ( mod ) : t -> t -> t
val ( land ) : t -> t -> t
val ( lor ) : t -> t -> t
val ( lxor ) : t -> t -> t
val ( lsl ) : t -> t -> t
val ( lsr ) : t -> t -> t
val ( asr ) : t -> t -> t
val ( >>= ) :
'a Core_kernel.Std.Or_error.t ->
('a -> 'b Core_kernel.Std.Or_error.t) ->
'b Core_kernel.Std.Or_error.t
val ( >>| ) :
'a Core_kernel.Std.Or_error.t ->
('a -> 'b) -> 'b Core_kernel.Std.Or_error.t
end
module Int_exn :
sig
type t = t
val zero : t
val one : t
val succ : t -> t
val pred : t -> t
val abs : t -> t
val neg : t -> t
val add : t -> t -> t
val sub : t -> t -> t
val mul : t -> t -> t
val div : t -> t -> t
val modulo : t -> t -> t
val lnot : t -> t
val logand : t -> t -> t
val logor : t -> t -> t
val logxor : t -> t -> t
val lshift : t -> t -> t
val rshift : t -> t -> t
val arshift : t -> t -> t
val ( ~- ) : t -> t
val ( + ) : t -> t -> t
val ( - ) : t -> t -> t
val ( * ) : t -> t -> t
val ( / ) : t -> t -> t
val ( mod ) : t -> t -> t
val ( land ) : t -> t -> t
val ( lor ) : t -> t -> t
val ( lxor ) : t -> t -> t
val ( lsl ) : t -> t -> t
val ( lsr ) : t -> t -> t
val ( asr ) : t -> t -> t
end
module Trie :
sig
module Big :
sig
module Bits :
sig
type 'a t
type key = t
val create : unit -> 'a t
val add : 'a t -> key:key -> data:'a -> unit
val change :
'a t -> key -> ('a option -> 'a option) -> unit
val find : 'a t -> key -> 'a option
val walk :
'a t ->
key -> init:'b -> f:('b -> 'a option -> 'b) -> 'b
val remove : 'a t -> key -> unit
val longest_match : 'a t -> key -> (int * 'a) option
val length : 'a t -> int
val pp : 'a printer -> 'a t printer
end
module Bytes :
sig
type 'a t
type key = t
val create : unit -> 'a t
val add : 'a t -> key:key -> data:'a -> unit
val change :
'a t -> key -> ('a option -> 'a option) -> unit
val find : 'a t -> key -> 'a option
val walk :
'a t ->
key -> init:'b -> f:('b -> 'a option -> 'b) -> 'b
val remove : 'a t -> key -> unit
val longest_match : 'a t -> key -> (int * 'a) option
val length : 'a t -> int
val pp : 'a printer -> 'a t printer
end
end
module Little :
sig
module Bits :
sig
type 'a t
type key = t
val create : unit -> 'a t
val add : 'a t -> key:key -> data:'a -> unit
val change :
'a t -> key -> ('a option -> 'a option) -> unit
val find : 'a t -> key -> 'a option
val walk :
'a t ->
key -> init:'b -> f:('b -> 'a option -> 'b) -> 'b
val remove : 'a t -> key -> unit
val longest_match : 'a t -> key -> (int * 'a) option
val length : 'a t -> int
val pp : 'a printer -> 'a t printer
end
module Bytes :
sig
type 'a t
type key = t
val create : unit -> 'a t
val add : 'a t -> key:key -> data:'a -> unit
val change :
'a t -> key -> ('a option -> 'a option) -> unit
val find : 'a t -> key -> 'a option
val walk :
'a t ->
key -> init:'b -> f:('b -> 'a option -> 'b) -> 'b
val remove : 'a t -> key -> unit
val longest_match : 'a t -> key -> (int * 'a) option
val length : 'a t -> int
val pp : 'a printer -> 'a t printer
end
end
end
end
module Addr :
sig
type t = addr
val to_string : t -> string
val str : unit -> t -> string
val pps : unit -> t -> string
val ppo : out_channel -> t -> unit
val pp_seq :
Format.formatter -> t Core_kernel.Std.Sequence.t -> unit
val pp : Format.formatter -> t -> unit
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness = Bitvector.comparator_witness
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val comparator :
(t, comparator_witness) Core_kernel.Comparator.comparator
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness) Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked : (Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter : 'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi : 'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a | `Right of 'a | `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness) Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list -> init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked : (Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi : 'a list t -> key:Key.t -> data:'a -> 'a list t
val change : 'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter : 'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi : 'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t -> init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t -> init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter : 'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct : ('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t * [ `Left of 'a | `Right of 'a | `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
val bin_size_t : ('a, 'a t) Bin_prot.Size.sizer1
val bin_write_t : ('a, 'a t) Bin_prot.Write.writer1
val bin_read_t : ('a, 'a t) Bin_prot.Read.reader1
val __bin_read_t__ : ('a, int -> 'a t) Bin_prot.Read.reader1
val bin_writer_t : ('a, 'a t) Bin_prot.Type_class.S1.writer
val bin_reader_t : ('a, 'a t) Bin_prot.Type_class.S1.reader
val bin_t : ('a, 'a t) Bin_prot.Type_class.S1.t
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness) Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum -> f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map : t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t = (Elt.t, Elt.comparator_witness) Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t -> init:'accum -> f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map : t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> Elt.t -> [ `Continue of 'b | `Stop of 'b ]) -> 'b
val fold_right : t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by : t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array : Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t -> f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
val bin_size_t : t Bin_prot.Size.sizer
val bin_write_t : t Bin_prot.Write.writer
val bin_read_t : t Bin_prot.Read.reader
val __bin_read_t__ : (int -> t) Bin_prot.Read.reader
val bin_writer_t : t Bin_prot.Type_class.writer
val bin_reader_t : t Bin_prot.Type_class.reader
val bin_t : t Bin_prot.Type_class.t
end
val hash : t -> int
val hashable : t Core_kernel.Std.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Std.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable : key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list -> ('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list, ('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list | `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) -> 'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) -> 'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key : ('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c -> f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ -> f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ -> f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ -> f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one : ('a, 'b list) t_ -> 'a key_ -> unit
val replace : ('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set : ('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ -> key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> unit Core_kernel.Or_error.t
val add_exn : ('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ -> 'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ -> key:'a key_ -> data:'b -> unit
val remove_multi : ('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c, ('a, 'b) t_ -> f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter : ('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ -> 'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) -> if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove : ('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals : ('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace : ('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ -> ('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ -> ('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr : ?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
val bin_size_t : ('a, 'a t) Bin_prot.Size.sizer1
val bin_write_t : ('a, 'a t) Bin_prot.Write.writer1
val bin_read_t : ('a, 'a t) Bin_prot.Read.reader1
val __bin_read_t__ : ('a, int -> 'a t) Bin_prot.Read.reader1
val bin_writer_t : ('a, 'a t) Bin_prot.Type_class.S1.writer
val bin_reader_t : ('a, 'a t) Bin_prot.Type_class.S1.reader
val bin_t : ('a, 'a t) Bin_prot.Type_class.S1.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val bin_size_t : t Bin_prot.Size.sizer
val bin_write_t : t Bin_prot.Write.writer
val bin_read_t : t Bin_prot.Read.reader
val __bin_read_t__ : (int -> t) Bin_prot.Read.reader
val bin_writer_t : t Bin_prot.Type_class.writer
val bin_reader_t : t Bin_prot.Type_class.reader
val bin_t : t Bin_prot.Type_class.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t -> init:'accum -> f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map : 'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt : 'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt : 'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t -> Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove : 'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace : 'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri : 'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t -> init:'b -> f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
val validate_positive : t Core_kernel.Validate.check
val validate_non_negative : t Core_kernel.Validate.check
val validate_negative : t Core_kernel.Validate.check
val validate_non_positive : t Core_kernel.Validate.check
val is_positive : t -> bool
val is_non_negative : t -> bool
val is_negative : t -> bool
val is_non_positive : t -> bool
val abs : t -> t
val neg : t -> t
val add : t -> t -> t
val sub : t -> t -> t
val mul : t -> t -> t
val div : t -> t -> t
val modulo : t -> t -> t
val lnot : t -> t
val logand : t -> t -> t
val logor : t -> t -> t
val logxor : t -> t -> t
val lshift : t -> t -> t
val rshift : t -> t -> t
val arshift : t -> t -> t
val ( ~- ) : t -> t
val ( + ) : t -> t -> t
val ( - ) : t -> t -> t
val ( * ) : t -> t -> t
val ( / ) : t -> t -> t
val ( mod ) : t -> t -> t
val ( land ) : t -> t -> t
val ( lor ) : t -> t -> t
val ( lxor ) : t -> t -> t
val ( lsl ) : t -> t -> t
val ( lsr ) : t -> t -> t
val ( asr ) : t -> t -> t
module Mono :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness) Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a | `Right of 'a | `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked : (Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter : 'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi : 'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a | `Right of 'a | `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map : t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness) Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum -> f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map : t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t -> f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
end
exception Width
type endian = endian = LittleEndian | BigEndian
val of_string : string -> t
val of_bool : bool -> t
val of_int : width:int -> int -> t
val of_int32 : ?width:int -> int32 -> t
val of_int64 : ?width:int -> int64 -> t
val b0 : t
val b1 : t
val one : int -> t
val zero : int -> t
val ones : int -> t
val of_binary : ?width:int -> endian -> string -> t
val to_int : t -> int Core_kernel.Std.Or_error.t
val to_int32 : t -> int32 Core_kernel.Std.Or_error.t
val to_int64 : t -> int64 Core_kernel.Std.Or_error.t
val string_of_value : ?hex:bool -> t -> string
val signed : t -> t
val is_zero : t -> bool
val is_one : t -> bool
val bitwidth : t -> int
val extract :
?hi:int -> ?lo:int -> t -> t Core_kernel.Std.Or_error.t
val extract_exn : ?hi:int -> ?lo:int -> t -> t
val concat : t -> t -> t
val ( @. ) : t -> t -> t
val succ : t -> t
val pred : t -> t
val nsucc : t -> int -> t
val npred : t -> int -> t
val ( ++ ) : t -> int -> t
val ( -- ) : t -> int -> t
val to_bytes : t -> endian -> t seq
val to_chars : t -> endian -> char seq
val to_bits : t -> endian -> bool seq
module Int_err :
sig
val ( !$ ) : t -> t Core_kernel.Std.Or_error.t
val i1 : t -> t Core_kernel.Std.Or_error.t
val i4 : t -> t Core_kernel.Std.Or_error.t
val i8 : t -> t Core_kernel.Std.Or_error.t
val i16 : t -> t Core_kernel.Std.Or_error.t
val i32 : t -> t Core_kernel.Std.Or_error.t
val i64 : t -> t Core_kernel.Std.Or_error.t
val int : int -> t -> t Core_kernel.Std.Or_error.t
val of_word_size :
Core_kernel.Std.Word_size.t ->
t -> t Core_kernel.Std.Or_error.t
type t = t Core_kernel.Std.Or_error.t
val zero : t
val one : t
val succ : t -> t
val pred : t -> t
val abs : t -> t
val neg : t -> t
val add : t -> t -> t
val sub : t -> t -> t
val mul : t -> t -> t
val div : t -> t -> t
val modulo : t -> t -> t
val lnot : t -> t
val logand : t -> t -> t
val logor : t -> t -> t
val logxor : t -> t -> t
val lshift : t -> t -> t
val rshift : t -> t -> t
val arshift : t -> t -> t
val ( ~- ) : t -> t
val ( + ) : t -> t -> t
val ( - ) : t -> t -> t
val ( * ) : t -> t -> t
val ( / ) : t -> t -> t
val ( mod ) : t -> t -> t
val ( land ) : t -> t -> t
val ( lor ) : t -> t -> t
val ( lxor ) : t -> t -> t
val ( lsl ) : t -> t -> t
val ( lsr ) : t -> t -> t
val ( asr ) : t -> t -> t
val ( >>= ) :
'a Core_kernel.Std.Or_error.t ->
('a -> 'b Core_kernel.Std.Or_error.t) ->
'b Core_kernel.Std.Or_error.t
val ( >>| ) :
'a Core_kernel.Std.Or_error.t ->
('a -> 'b) -> 'b Core_kernel.Std.Or_error.t
end
module Int_exn :
sig
type t = t
val zero : t
val one : t
val succ : t -> t
val pred : t -> t
val abs : t -> t
val neg : t -> t
val add : t -> t -> t
val sub : t -> t -> t
val mul : t -> t -> t
val div : t -> t -> t
val modulo : t -> t -> t
val lnot : t -> t
val logand : t -> t -> t
val logor : t -> t -> t
val logxor : t -> t -> t
val lshift : t -> t -> t
val rshift : t -> t -> t
val arshift : t -> t -> t
val ( ~- ) : t -> t
val ( + ) : t -> t -> t
val ( - ) : t -> t -> t
val ( * ) : t -> t -> t
val ( / ) : t -> t -> t
val ( mod ) : t -> t -> t
val ( land ) : t -> t -> t
val ( lor ) : t -> t -> t
val ( lxor ) : t -> t -> t
val ( lsl ) : t -> t -> t
val ( lsr ) : t -> t -> t
val ( asr ) : t -> t -> t
end
module Trie :
sig
module Big :
sig
module Bits :
sig
type 'a t
type key = t
val create : unit -> 'a t
val add : 'a t -> key:key -> data:'a -> unit
val change :
'a t -> key -> ('a option -> 'a option) -> unit
val find : 'a t -> key -> 'a option
val walk :
'a t ->
key -> init:'b -> f:('b -> 'a option -> 'b) -> 'b
val remove : 'a t -> key -> unit
val longest_match : 'a t -> key -> (int * 'a) option
val length : 'a t -> int
val pp : 'a printer -> 'a t printer
end
module Bytes :
sig
type 'a t
type key = t
val create : unit -> 'a t
val add : 'a t -> key:key -> data:'a -> unit
val change :
'a t -> key -> ('a option -> 'a option) -> unit
val find : 'a t -> key -> 'a option
val walk :
'a t ->
key -> init:'b -> f:('b -> 'a option -> 'b) -> 'b
val remove : 'a t -> key -> unit
val longest_match : 'a t -> key -> (int * 'a) option
val length : 'a t -> int
val pp : 'a printer -> 'a t printer
end
end
module Little :
sig
module Bits :
sig
type 'a t
type key = t
val create : unit -> 'a t
val add : 'a t -> key:key -> data:'a -> unit
val change :
'a t -> key -> ('a option -> 'a option) -> unit
val find : 'a t -> key -> 'a option
val walk :
'a t ->
key -> init:'b -> f:('b -> 'a option -> 'b) -> 'b
val remove : 'a t -> key -> unit
val longest_match : 'a t -> key -> (int * 'a) option
val length : 'a t -> int
val pp : 'a printer -> 'a t printer
end
module Bytes :
sig
type 'a t
type key = t
val create : unit -> 'a t
val add : 'a t -> key:key -> data:'a -> unit
val change :
'a t -> key -> ('a option -> 'a option) -> unit
val find : 'a t -> key -> 'a option
val walk :
'a t ->
key -> init:'b -> f:('b -> 'a option -> 'b) -> 'b
val remove : 'a t -> key -> unit
val longest_match : 'a t -> key -> (int * 'a) option
val length : 'a t -> int
val pp : 'a printer -> 'a t printer
end
end
end
val memref :
?disp:int ->
?index:int -> ?scale:Bap.Std.size -> Bap.Std.addr -> Bap.Std.addr
end
module Type :
sig
type t =
Imm of Bap.Std.nat1
| Mem of Bap.Std.addr_size * Bap.Std.size
val to_string : t -> string
val str : unit -> t -> string
val pps : unit -> t -> string
val ppo : out_channel -> t -> unit
val pp_seq :
Format.formatter -> t Core_kernel.Std.Sequence.t -> unit
val pp : Format.formatter -> t -> unit
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val comparator :
(t, comparator_witness) Core_kernel.Comparator.comparator
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness) Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked : (Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter : 'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi : 'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a | `Right of 'a | `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness) Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list -> init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked : (Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi : 'a list t -> key:Key.t -> data:'a -> 'a list t
val change : 'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter : 'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi : 'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t -> init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t -> init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter : 'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct : ('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t * [ `Left of 'a | `Right of 'a | `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
val bin_size_t : ('a, 'a t) Bin_prot.Size.sizer1
val bin_write_t : ('a, 'a t) Bin_prot.Write.writer1
val bin_read_t : ('a, 'a t) Bin_prot.Read.reader1
val __bin_read_t__ : ('a, int -> 'a t) Bin_prot.Read.reader1
val bin_writer_t : ('a, 'a t) Bin_prot.Type_class.S1.writer
val bin_reader_t : ('a, 'a t) Bin_prot.Type_class.S1.reader
val bin_t : ('a, 'a t) Bin_prot.Type_class.S1.t
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness) Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum -> f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map : t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t = (Elt.t, Elt.comparator_witness) Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t -> init:'accum -> f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map : t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> Elt.t -> [ `Continue of 'b | `Stop of 'b ]) -> 'b
val fold_right : t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by : t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array : Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t -> f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
val bin_size_t : t Bin_prot.Size.sizer
val bin_write_t : t Bin_prot.Write.writer
val bin_read_t : t Bin_prot.Read.reader
val __bin_read_t__ : (int -> t) Bin_prot.Read.reader
val bin_writer_t : t Bin_prot.Type_class.writer
val bin_reader_t : t Bin_prot.Type_class.reader
val bin_t : t Bin_prot.Type_class.t
end
val hash : t -> int
val hashable : t Core_kernel.Std.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Std.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable : key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list -> ('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list, ('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list | `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) -> 'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) -> 'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key : ('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c -> f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ -> f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ -> f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ -> f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one : ('a, 'b list) t_ -> 'a key_ -> unit
val replace : ('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set : ('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ -> key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> unit Core_kernel.Or_error.t
val add_exn : ('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ -> 'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ -> key:'a key_ -> data:'b -> unit
val remove_multi : ('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c, ('a, 'b) t_ -> f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter : ('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ -> 'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) -> if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove : ('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals : ('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace : ('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ -> ('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ -> ('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr : ?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
val bin_size_t : ('a, 'a t) Bin_prot.Size.sizer1
val bin_write_t : ('a, 'a t) Bin_prot.Write.writer1
val bin_read_t : ('a, 'a t) Bin_prot.Read.reader1
val __bin_read_t__ : ('a, int -> 'a t) Bin_prot.Read.reader1
val bin_writer_t : ('a, 'a t) Bin_prot.Type_class.S1.writer
val bin_reader_t : ('a, 'a t) Bin_prot.Type_class.S1.reader
val bin_t : ('a, 'a t) Bin_prot.Type_class.S1.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val bin_size_t : t Bin_prot.Size.sizer
val bin_write_t : t Bin_prot.Write.writer
val bin_read_t : t Bin_prot.Read.reader
val __bin_read_t__ : (int -> t) Bin_prot.Read.reader
val bin_writer_t : t Bin_prot.Type_class.writer
val bin_reader_t : t Bin_prot.Type_class.reader
val bin_t : t Bin_prot.Type_class.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t -> init:'accum -> f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map : 'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt : 'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt : 'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t -> Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove : 'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace : 'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri : 'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t -> init:'b -> f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
end
type typ = Bap.Std.Type.t
val bool_t : Bap.Std.typ
val reg8_t : Bap.Std.typ
val reg16_t : Bap.Std.typ
val reg32_t : Bap.Std.typ
val reg64_t : Bap.Std.typ
val reg128_t : Bap.Std.typ
val reg256_t : Bap.Std.typ
val mem32_t : Bap.Std.size -> Bap.Std.typ
val mem64_t : Bap.Std.size -> Bap.Std.typ
type var
module Var :
sig
type t = Bap.Std.var
val to_string : t -> string
val str : unit -> t -> string
val pps : unit -> t -> string
val ppo : out_channel -> t -> unit
val pp_seq :
Format.formatter -> t Core_kernel.Std.Sequence.t -> unit
val pp : Format.formatter -> t -> unit
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val comparator :
(t, comparator_witness) Core_kernel.Comparator.comparator
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness) Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked : (Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter : 'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi : 'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a | `Right of 'a | `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness) Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list -> init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked : (Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi : 'a list t -> key:Key.t -> data:'a -> 'a list t
val change : 'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter : 'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi : 'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t -> init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t -> init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter : 'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct : ('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t * [ `Left of 'a | `Right of 'a | `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
val bin_size_t : ('a, 'a t) Bin_prot.Size.sizer1
val bin_write_t : ('a, 'a t) Bin_prot.Write.writer1
val bin_read_t : ('a, 'a t) Bin_prot.Read.reader1
val __bin_read_t__ : ('a, int -> 'a t) Bin_prot.Read.reader1
val bin_writer_t : ('a, 'a t) Bin_prot.Type_class.S1.writer
val bin_reader_t : ('a, 'a t) Bin_prot.Type_class.S1.reader
val bin_t : ('a, 'a t) Bin_prot.Type_class.S1.t
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness) Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum -> f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map : t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t = (Elt.t, Elt.comparator_witness) Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t -> init:'accum -> f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map : t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> Elt.t -> [ `Continue of 'b | `Stop of 'b ]) -> 'b
val fold_right : t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by : t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array : Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t -> f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
val bin_size_t : t Bin_prot.Size.sizer
val bin_write_t : t Bin_prot.Write.writer
val bin_read_t : t Bin_prot.Read.reader
val __bin_read_t__ : (int -> t) Bin_prot.Read.reader
val bin_writer_t : t Bin_prot.Type_class.writer
val bin_reader_t : t Bin_prot.Type_class.reader
val bin_t : t Bin_prot.Type_class.t
end
val hash : t -> int
val hashable : t Core_kernel.Std.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Std.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable : key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list -> ('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list, ('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list | `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) -> 'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) -> 'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key : ('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c -> f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ -> f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ -> f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ -> f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one : ('a, 'b list) t_ -> 'a key_ -> unit
val replace : ('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set : ('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ -> key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> unit Core_kernel.Or_error.t
val add_exn : ('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ -> 'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ -> key:'a key_ -> data:'b -> unit
val remove_multi : ('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c, ('a, 'b) t_ -> f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter : ('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ -> 'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) -> if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove : ('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals : ('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace : ('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ -> ('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ -> ('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr : ?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
val bin_size_t : ('a, 'a t) Bin_prot.Size.sizer1
val bin_write_t : ('a, 'a t) Bin_prot.Write.writer1
val bin_read_t : ('a, 'a t) Bin_prot.Read.reader1
val __bin_read_t__ : ('a, int -> 'a t) Bin_prot.Read.reader1
val bin_writer_t : ('a, 'a t) Bin_prot.Type_class.S1.writer
val bin_reader_t : ('a, 'a t) Bin_prot.Type_class.S1.reader
val bin_t : ('a, 'a t) Bin_prot.Type_class.S1.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val bin_size_t : t Bin_prot.Size.sizer
val bin_write_t : t Bin_prot.Write.writer
val bin_read_t : t Bin_prot.Read.reader
val __bin_read_t__ : (int -> t) Bin_prot.Read.reader
val bin_writer_t : t Bin_prot.Type_class.writer
val bin_reader_t : t Bin_prot.Type_class.reader
val bin_t : t Bin_prot.Type_class.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t -> init:'accum -> f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map : 'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt : 'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt : 'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t -> Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove : 'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace : 'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri : 'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t -> init:'b -> f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
val create : ?tmp:bool -> string -> Bap.Std.typ -> Bap.Std.Var.t
val name : Bap.Std.Var.t -> string
val typ : Bap.Std.Var.t -> Bap.Std.typ
val is_tmp : Bap.Std.Var.t -> bool
val renumber : Bap.Std.Var.t -> int -> Bap.Std.Var.t
val version : Bap.Std.Var.t -> int
val base : Bap.Std.Var.t -> Bap.Std.Var.t
val same : Bap.Std.Var.t -> Bap.Std.Var.t -> bool
module V1 :
sig
type r = string * int * Bap.Std.typ * bool
val serialize : Bap.Std.Var.t -> Bap.Std.Var.V1.r
val deserialize : Bap.Std.Var.V1.r -> Bap.Std.Var.t
end
end
module Bil :
sig
module Types :
sig
type cast = UNSIGNED | SIGNED | HIGH | LOW
type binop =
PLUS
| MINUS
| TIMES
| DIVIDE
| SDIVIDE
| MOD
| SMOD
| LSHIFT
| RSHIFT
| ARSHIFT
| AND
| OR
| XOR
| EQ
| NEQ
| LT
| LE
| SLT
| SLE
type unop = NEG | NOT
type exp =
Load of Bap.Std.Bil.Types.exp * Bap.Std.Bil.Types.exp *
Bap.Std.endian * Bap.Std.size
| Store of Bap.Std.Bil.Types.exp * Bap.Std.Bil.Types.exp *
Bap.Std.Bil.Types.exp * Bap.Std.endian * Bap.Std.size
| BinOp of Bap.Std.Bil.Types.binop * Bap.Std.Bil.Types.exp *
Bap.Std.Bil.Types.exp
| UnOp of Bap.Std.Bil.Types.unop * Bap.Std.Bil.Types.exp
| Var of Bap.Std.var
| Int of Bap.Std.word
| Cast of Bap.Std.Bil.Types.cast * Bap.Std.nat1 *
Bap.Std.Bil.Types.exp
| Let of Bap.Std.var * Bap.Std.Bil.Types.exp *
Bap.Std.Bil.Types.exp
| Unknown of string * Bap.Std.typ
| Ite of Bap.Std.Bil.Types.exp * Bap.Std.Bil.Types.exp *
Bap.Std.Bil.Types.exp
| Extract of Bap.Std.nat1 * Bap.Std.nat1 *
Bap.Std.Bil.Types.exp
| Concat of Bap.Std.Bil.Types.exp * Bap.Std.Bil.Types.exp
type stmt =
Move of Bap.Std.var * Bap.Std.Bil.Types.exp
| Jmp of Bap.Std.Bil.Types.exp
| Special of string
| While of Bap.Std.Bil.Types.exp *
Bap.Std.Bil.Types.stmt list
| If of Bap.Std.Bil.Types.exp * Bap.Std.Bil.Types.stmt list *
Bap.Std.Bil.Types.stmt list
| CpuExn of int
end
type cast = Types.cast = UNSIGNED | SIGNED | HIGH | LOW
type binop =
Types.binop =
PLUS
| MINUS
| TIMES
| DIVIDE
| SDIVIDE
| MOD
| SMOD
| LSHIFT
| RSHIFT
| ARSHIFT
| AND
| OR
| XOR
| EQ
| NEQ
| LT
| LE
| SLT
| SLE
type unop = Types.unop = NEG | NOT
type exp =
Types.exp =
Load of exp * exp * endian * size
| Store of exp * exp * exp * endian * size
| BinOp of binop * exp * exp
| UnOp of unop * exp
| Var of var
| Int of word
| Cast of cast * nat1 * exp
| Let of var * exp * exp
| Unknown of string * typ
| Ite of exp * exp * exp
| Extract of nat1 * nat1 * exp
| Concat of exp * exp
type stmt =
Types.stmt =
Move of var * exp
| Jmp of exp
| Special of string
| While of exp * stmt list
| If of exp * stmt list * stmt list
| CpuExn of int
type t = stmt list
val to_string : t -> string
val str : unit -> t -> string
val pps : unit -> t -> string
val ppo : out_channel -> t -> unit
val pp_seq :
Format.formatter -> t Core_kernel.Std.Sequence.t -> unit
val pp : Format.formatter -> t -> unit
module Infix :
sig
val ( := ) : Bap.Std.var -> exp -> stmt
val ( + ) : exp -> exp -> exp
val ( - ) : exp -> exp -> exp
val ( * ) : exp -> exp -> exp
val ( / ) : exp -> exp -> exp
val ( /$ ) : exp -> exp -> exp
val ( mod ) : exp -> exp -> exp
val ( %$ ) : exp -> exp -> exp
val ( lsl ) : exp -> exp -> exp
val ( lsr ) : exp -> exp -> exp
val ( asr ) : exp -> exp -> exp
val ( land ) : exp -> exp -> exp
val ( lor ) : exp -> exp -> exp
val ( lxor ) : exp -> exp -> exp
val lnot : exp -> exp
val ( = ) : exp -> exp -> exp
val ( <> ) : exp -> exp -> exp
val ( < ) : exp -> exp -> exp
val ( > ) : exp -> exp -> exp
val ( <= ) : exp -> exp -> exp
val ( >= ) : exp -> exp -> exp
val ( <$ ) : exp -> exp -> exp
val ( >$ ) : exp -> exp -> exp
val ( <=$ ) : exp -> exp -> exp
val ( >=$ ) : exp -> exp -> exp
val ( ^ ) : exp -> exp -> exp
end
val ( := ) : var -> exp -> stmt
val ( + ) : exp -> exp -> exp
val ( - ) : exp -> exp -> exp
val ( * ) : exp -> exp -> exp
val ( / ) : exp -> exp -> exp
val ( /$ ) : exp -> exp -> exp
val ( mod ) : exp -> exp -> exp
val ( %$ ) : exp -> exp -> exp
val ( lsl ) : exp -> exp -> exp
val ( lsr ) : exp -> exp -> exp
val ( asr ) : exp -> exp -> exp
val ( land ) : exp -> exp -> exp
val ( lor ) : exp -> exp -> exp
val ( lxor ) : exp -> exp -> exp
val lnot : exp -> exp
val ( = ) : exp -> exp -> exp
val ( <> ) : exp -> exp -> exp
val ( < ) : exp -> exp -> exp
val ( > ) : exp -> exp -> exp
val ( <= ) : exp -> exp -> exp
val ( >= ) : exp -> exp -> exp
val ( <$ ) : exp -> exp -> exp
val ( >$ ) : exp -> exp -> exp
val ( <=$ ) : exp -> exp -> exp
val ( >=$ ) : exp -> exp -> exp
val ( ^ ) : exp -> exp -> exp
val move : Bap.Std.var -> exp -> stmt
val jmp : exp -> stmt
val special : string -> stmt
val while_ : exp -> stmt list -> stmt
val if_ : exp -> stmt list -> stmt list -> stmt
val cpuexn : int -> stmt
val unsigned : cast
val signed : cast
val high : cast
val low : cast
val plus : binop
val minus : binop
val times : binop
val divide : binop
val sdivide : binop
val modulo : binop
val smodulo : binop
val lshift : binop
val rshift : binop
val arshift : binop
val bit_and : binop
val bit_or : binop
val bit_xor : binop
val eq : binop
val neq : binop
val lt : binop
val le : binop
val slt : binop
val sle : binop
val neg : unop
val not : unop
val load :
mem:exp -> addr:exp -> Bap.Std.endian -> Bap.Std.size -> exp
val store :
mem:exp ->
addr:exp -> exp -> Bap.Std.endian -> Bap.Std.size -> exp
val binop : binop -> exp -> exp -> exp
val unop : unop -> exp -> exp
val var : Bap.Std.var -> exp
val int : Bap.Std.Bitvector.t -> exp
val cast : cast -> Bap.Std.nat1 -> exp -> exp
val let_ : Bap.Std.var -> exp -> exp -> exp
val unknown : string -> Bap.Std.typ -> exp
val ite : if_:exp -> then_:exp -> else_:exp -> exp
val extract : hi:Bap.Std.nat1 -> lo:Bap.Std.nat1 -> exp -> exp
val concat : exp -> exp -> exp
class state :
object
val exps_stack : exp list
val in_jmp : bool
val in_loop : bool
val in_move : bool
val preds : stmt list
val stmts_stack : stmt list
val succs : stmt list
val under_condition : bool
end
class ['a] visitor :
object
val exps_stack : exp list
val in_jmp : bool
val in_loop : bool
val in_move : bool
val preds : stmt list
val stmts_stack : stmt list
val succs : stmt list
val under_condition : bool
method enter_binop : binop -> exp -> exp -> 'a -> 'a
method enter_cast : cast -> Bap.Std.nat1 -> exp -> 'a -> 'a
method enter_concat : exp -> exp -> 'a -> 'a
method enter_cpuexn : int -> 'a -> 'a
method enter_exp : exp -> 'a -> 'a
method enter_extract :
hi:Bap.Std.nat1 -> lo:Bap.Std.nat1 -> exp -> 'a -> 'a
method enter_if :
cond:exp -> yes:stmt list -> no:stmt list -> 'a -> 'a
method enter_int : Bap.Std.word -> 'a -> 'a
method enter_ite : cond:exp -> yes:exp -> no:exp -> 'a -> 'a
method enter_jmp : exp -> 'a -> 'a
method enter_let :
Bap.Std.var -> exp:exp -> body:exp -> 'a -> 'a
method enter_load :
mem:exp ->
addr:exp -> Bap.Std.endian -> Bap.Std.size -> 'a -> 'a
method enter_move : Bap.Std.var -> exp -> 'a -> 'a
method enter_special : string -> 'a -> 'a
method enter_stmt : stmt -> 'a -> 'a
method enter_store :
mem:exp ->
addr:exp ->
exp:exp -> Bap.Std.endian -> Bap.Std.size -> 'a -> 'a
method enter_unknown : string -> Bap.Std.typ -> 'a -> 'a
method enter_unop : unop -> exp -> 'a -> 'a
method enter_var : Bap.Std.var -> 'a -> 'a
method enter_while : cond:exp -> stmt list -> 'a -> 'a
method leave_binop : binop -> exp -> exp -> 'a -> 'a
method leave_cast : cast -> Bap.Std.nat1 -> exp -> 'a -> 'a
method leave_concat : exp -> exp -> 'a -> 'a
method leave_cpuexn : int -> 'a -> 'a
method leave_exp : exp -> 'a -> 'a
method leave_extract :
hi:Bap.Std.nat1 -> lo:Bap.Std.nat1 -> exp -> 'a -> 'a
method leave_if :
cond:exp -> yes:stmt list -> no:stmt list -> 'a -> 'a
method leave_int : Bap.Std.word -> 'a -> 'a
method leave_ite : cond:exp -> yes:exp -> no:exp -> 'a -> 'a
method leave_jmp : exp -> 'a -> 'a
method leave_let :
Bap.Std.var -> exp:exp -> body:exp -> 'a -> 'a
method leave_load :
mem:exp ->
addr:exp -> Bap.Std.endian -> Bap.Std.size -> 'a -> 'a
method leave_move : Bap.Std.var -> exp -> 'a -> 'a
method leave_special : string -> 'a -> 'a
method leave_stmt : stmt -> 'a -> 'a
method leave_store :
mem:exp ->
addr:exp ->
exp:exp -> Bap.Std.endian -> Bap.Std.size -> 'a -> 'a
method leave_unknown : string -> Bap.Std.typ -> 'a -> 'a
method leave_unop : unop -> exp -> 'a -> 'a
method leave_var : Bap.Std.var -> 'a -> 'a
method leave_while : cond:exp -> stmt list -> 'a -> 'a
method run : stmt list -> 'a -> 'a
method visit_binop : binop -> exp -> exp -> 'a -> 'a
method visit_cast : cast -> Bap.Std.nat1 -> exp -> 'a -> 'a
method visit_concat : exp -> exp -> 'a -> 'a
method visit_cpuexn : int -> 'a -> 'a
method visit_exp : exp -> 'a -> 'a
method visit_extract :
hi:Bap.Std.nat1 -> lo:Bap.Std.nat1 -> exp -> 'a -> 'a
method visit_if :
cond:exp -> yes:stmt list -> no:stmt list -> 'a -> 'a
method visit_int : Bap.Std.word -> 'a -> 'a
method visit_ite : cond:exp -> yes:exp -> no:exp -> 'a -> 'a
method visit_jmp : exp -> 'a -> 'a
method visit_let :
Bap.Std.var -> exp:exp -> body:exp -> 'a -> 'a
method visit_load :
mem:exp ->
addr:exp -> Bap.Std.endian -> Bap.Std.size -> 'a -> 'a
method visit_move : Bap.Std.var -> exp -> 'a -> 'a
method visit_special : string -> 'a -> 'a
method visit_stmt : stmt -> 'a -> 'a
method visit_store :
mem:exp ->
addr:exp ->
exp:exp -> Bap.Std.endian -> Bap.Std.size -> 'a -> 'a
method visit_unknown : string -> Bap.Std.typ -> 'a -> 'a
method visit_unop : unop -> exp -> 'a -> 'a
method visit_var : Bap.Std.var -> 'a -> 'a
method visit_while : cond:exp -> stmt list -> 'a -> 'a
end
class ['a] finder :
object
val exps_stack : exp list
val in_jmp : bool
val in_loop : bool
val in_move : bool
val preds : stmt list
val stmts_stack : stmt list
val succs : stmt list
val under_condition : bool
method enter_binop :
binop ->
exp ->
exp ->
'a option Core_kernel.Std.return ->
'a option Core_kernel.Std.return
method enter_cast :
cast ->
nat1 ->
exp ->
'a option Core_kernel.Std.return ->
'a option Core_kernel.Std.return
method enter_concat :
exp ->
exp ->
'a option Core_kernel.Std.return ->
'a option Core_kernel.Std.return
method enter_cpuexn :
int ->
'a option Core_kernel.Std.return ->
'a option Core_kernel.Std.return
method enter_exp :
exp ->
'a option Core_kernel.Std.return ->
'a option Core_kernel.Std.return
method enter_extract :
hi:nat1 ->
lo:nat1 ->
exp ->
'a option Core_kernel.Std.return ->
'a option Core_kernel.Std.return
method enter_if :
cond:exp ->
yes:stmt list ->
no:stmt list ->
'a option Core_kernel.Std.return ->
'a option Core_kernel.Std.return
method enter_int :
word ->
'a option Core_kernel.Std.return ->
'a option Core_kernel.Std.return
method enter_ite :
cond:exp ->
yes:exp ->
no:exp ->
'a option Core_kernel.Std.return ->
'a option Core_kernel.Std.return
method enter_jmp :
exp ->
'a option Core_kernel.Std.return ->
'a option Core_kernel.Std.return
method enter_let :
var ->
exp:exp ->
body:exp ->
'a option Core_kernel.Std.return ->
'a option Core_kernel.Std.return
method enter_load :
mem:exp ->
addr:exp ->
endian ->
size ->
'a option Core_kernel.Std.return ->
'a option Core_kernel.Std.return
method enter_move :
var ->
exp ->
'a option Core_kernel.Std.return ->
'a option Core_kernel.Std.return
method enter_special :
string ->
'a option Core_kernel.Std.return ->
'a option Core_kernel.Std.return
method enter_stmt :
stmt ->
'a option Core_kernel.Std.return ->
'a option Core_kernel.Std.return
method enter_store :
mem:exp ->
addr:exp ->
exp:exp ->
endian ->
size ->
'a option Core_kernel.Std.return ->
'a option Core_kernel.Std.return
method enter_unknown :
string ->
typ ->
'a option Core_kernel.Std.return ->
'a option Core_kernel.Std.return
method enter_unop :
unop ->
exp ->
'a option Core_kernel.Std.return ->
'a option Core_kernel.Std.return
method enter_var :
var ->
'a option Core_kernel.Std.return ->
'a option Core_kernel.Std.return
method enter_while :
cond:exp ->
stmt list ->
'a option Core_kernel.Std.return ->
'a option Core_kernel.Std.return
method find_in_bil : stmt list -> 'a option
method find_in_exp : exp -> 'a option
method leave_binop :
binop ->
exp ->
exp ->
'a option Core_kernel.Std.return ->
'a option Core_kernel.Std.return
method leave_cast :
cast ->
nat1 ->
exp ->
'a option Core_kernel.Std.return ->
'a option Core_kernel.Std.return
method leave_concat :
exp ->
exp ->
'a option Core_kernel.Std.return ->
'a option Core_kernel.Std.return
method leave_cpuexn :
int ->
'a option Core_kernel.Std.return ->
'a option Core_kernel.Std.return
method leave_exp :
exp ->
'a option Core_kernel.Std.return ->
'a option Core_kernel.Std.return
method leave_extract :
hi:nat1 ->
lo:nat1 ->
exp ->
'a option Core_kernel.Std.return ->
'a option Core_kernel.Std.return
method leave_if :
cond:exp ->
yes:stmt list ->
no:stmt list ->
'a option Core_kernel.Std.return ->
'a option Core_kernel.Std.return
method leave_int :
word ->
'a option Core_kernel.Std.return ->
'a option Core_kernel.Std.return
method leave_ite :
cond:exp ->
yes:exp ->
no:exp ->
'a option Core_kernel.Std.return ->
'a option Core_kernel.Std.return
method leave_jmp :
exp ->
'a option Core_kernel.Std.return ->
'a option Core_kernel.Std.return
method leave_let :
var ->
exp:exp ->
body:exp ->
'a option Core_kernel.Std.return ->
'a option Core_kernel.Std.return
method leave_load :
mem:exp ->
addr:exp ->
endian ->
size ->
'a option Core_kernel.Std.return ->
'a option Core_kernel.Std.return
method leave_move :
var ->
exp ->
'a option Core_kernel.Std.return ->
'a option Core_kernel.Std.return
method leave_special :
string ->
'a option Core_kernel.Std.return ->
'a option Core_kernel.Std.return
method leave_stmt :
stmt ->
'a option Core_kernel.Std.return ->
'a option Core_kernel.Std.return
method leave_store :
mem:exp ->
addr:exp ->
exp:exp ->
endian ->
size ->
'a option Core_kernel.Std.return ->
'a option Core_kernel.Std.return
method leave_unknown :
string ->
typ ->
'a option Core_kernel.Std.return ->
'a option Core_kernel.Std.return
method leave_unop :
unop ->
exp ->
'a option Core_kernel.Std.return ->
'a option Core_kernel.Std.return
method leave_var :
var ->
'a option Core_kernel.Std.return ->
'a option Core_kernel.Std.return
method leave_while :
cond:exp ->
stmt list ->
'a option Core_kernel.Std.return ->
'a option Core_kernel.Std.return
method run :
stmt list ->
'a option Core_kernel.Std.return ->
'a option Core_kernel.Std.return
method visit_binop :
binop ->
exp ->
exp ->
'a option Core_kernel.Std.return ->
'a option Core_kernel.Std.return
method visit_cast :
cast ->
nat1 ->
exp ->
'a option Core_kernel.Std.return ->
'a option Core_kernel.Std.return
method visit_concat :
exp ->
exp ->
'a option Core_kernel.Std.return ->
'a option Core_kernel.Std.return
method visit_cpuexn :
int ->
'a option Core_kernel.Std.return ->
'a option Core_kernel.Std.return
method visit_exp :
exp ->
'a option Core_kernel.Std.return ->
'a option Core_kernel.Std.return
method visit_extract :
hi:nat1 ->
lo:nat1 ->
exp ->
'a option Core_kernel.Std.return ->
'a option Core_kernel.Std.return
method visit_if :
cond:exp ->
yes:stmt list ->
no:stmt list ->
'a option Core_kernel.Std.return ->
'a option Core_kernel.Std.return
method visit_int :
word ->
'a option Core_kernel.Std.return ->
'a option Core_kernel.Std.return
method visit_ite :
cond:exp ->
yes:exp ->
no:exp ->
'a option Core_kernel.Std.return ->
'a option Core_kernel.Std.return
method visit_jmp :
exp ->
'a option Core_kernel.Std.return ->
'a option Core_kernel.Std.return
method visit_let :
var ->
exp:exp ->
body:exp ->
'a option Core_kernel.Std.return ->
'a option Core_kernel.Std.return
method visit_load :
mem:exp ->
addr:exp ->
endian ->
size ->
'a option Core_kernel.Std.return ->
'a option Core_kernel.Std.return
method visit_move :
var ->
exp ->
'a option Core_kernel.Std.return ->
'a option Core_kernel.Std.return
method visit_special :
string ->
'a option Core_kernel.Std.return ->
'a option Core_kernel.Std.return
method visit_stmt :
stmt ->
'a option Core_kernel.Std.return ->
'a option Core_kernel.Std.return
method visit_store :
mem:exp ->
addr:exp ->
exp:exp ->
endian ->
size ->
'a option Core_kernel.Std.return ->
'a option Core_kernel.Std.return
method visit_unknown :
string ->
typ ->
'a option Core_kernel.Std.return ->
'a option Core_kernel.Std.return
method visit_unop :
unop ->
exp ->
'a option Core_kernel.Std.return ->
'a option Core_kernel.Std.return
method visit_var :
var ->
'a option Core_kernel.Std.return ->
'a option Core_kernel.Std.return
method visit_while :
cond:exp ->
stmt list ->
'a option Core_kernel.Std.return ->
'a option Core_kernel.Std.return
end
class mapper :
object
val exps_stack : exp list
val in_jmp : bool
val in_loop : bool
val in_move : bool
val preds : stmt list
val stmts_stack : stmt list
val succs : stmt list
val under_condition : bool
method map_binop : binop -> exp -> exp -> exp
method map_cast : cast -> Bap.Std.nat1 -> exp -> exp
method map_concat : exp -> exp -> exp
method map_cpuexn : int -> stmt list
method map_exp : exp -> exp
method map_extract :
hi:Bap.Std.nat1 -> lo:Bap.Std.nat1 -> exp -> exp
method map_if :
cond:exp -> yes:stmt list -> no:stmt list -> stmt list
method map_int : Bap.Std.word -> exp
method map_ite : cond:exp -> yes:exp -> no:exp -> exp
method map_jmp : exp -> stmt list
method map_let : Bap.Std.var -> exp:exp -> body:exp -> exp
method map_load :
mem:exp -> addr:exp -> Bap.Std.endian -> Bap.Std.size -> exp
method map_move : Bap.Std.var -> exp -> stmt list
method map_special : string -> stmt list
method map_stmt : stmt -> stmt list
method map_store :
mem:exp ->
addr:exp -> exp:exp -> Bap.Std.endian -> Bap.Std.size -> exp
method map_sym : Bap.Std.var -> Bap.Std.var
method map_unknown : string -> Bap.Std.typ -> exp
method map_unop : unop -> exp -> exp
method map_var : Bap.Std.var -> exp
method map_while : cond:exp -> stmt list -> stmt list
method run : stmt list -> stmt list
end
val fold : 'a #Bap.Std.Bil.visitor -> init:'a -> stmt list -> 'a
val iter : unit #Bap.Std.Bil.visitor -> stmt list -> unit
val map : #Bap.Std.Bil.mapper -> stmt list -> stmt list
val find : 'a #Bap.Std.Bil.finder -> stmt list -> 'a option
val exists : unit #Bap.Std.Bil.finder -> stmt list -> bool
val is_referenced : Bap.Std.var -> stmt list -> bool
val is_assigned : ?strict:bool -> Bap.Std.var -> stmt list -> bool
val prune_unreferenced : stmt list -> stmt list
val normalize_negatives : stmt list -> stmt list
val substitute : exp -> exp -> stmt list -> stmt list
val substitute_var : Bap.Std.var -> exp -> stmt list -> stmt list
val free_vars : stmt list -> Bap.Std.Var.Set.t
val fold_consts : stmt list -> stmt list
class constant_folder : mapper
val fixpoint : (stmt list -> stmt list) -> stmt list -> stmt list
type result
class type storage =
object ('a)
method load : Bap.Std.addr -> Bap.Std.word option
method save : Bap.Std.addr -> Bap.Std.word -> 'a
end
module Storage :
sig class linear : storage class sparse : storage end
type value = Imm of Bap.Std.word | Mem of Bap.Std.Bil.storage | Bot
module Result :
sig
type id
type t = Bap.Std.Bil.result
type 'a r = (Bap.Std.Bil.result, 'a) Bap.Std.Monad.State.t
type 'a u = (unit, 'a) Bap.Std.Monad.State.t
val undefined : Bap.Std.Bil.Result.id -> Bap.Std.Bil.Result.t
val storage :
Bap.Std.Bil.storage ->
Bap.Std.Bil.Result.id -> Bap.Std.Bil.Result.t
val word :
Bap.Std.word -> Bap.Std.Bil.Result.id -> Bap.Std.Bil.Result.t
val id : Bap.Std.Bil.Result.t -> Bap.Std.Bil.Result.id
val value : Bap.Std.Bil.Result.t -> Bap.Std.Bil.value
module Id :
sig
type t = id
val to_string : t -> string
val str : unit -> t -> string
val pps : unit -> t -> string
val ppo : out_channel -> t -> unit
val pp_seq :
Format.formatter -> t Core_kernel.Std.Sequence.t -> unit
val pp : Format.formatter -> t -> unit
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val comparator :
(t, comparator_witness) Core_kernel.Comparator.comparator
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a | `Right of 'a | `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
val bin_size_t : ('a, 'a t) Bin_prot.Size.sizer1
val bin_write_t : ('a, 'a t) Bin_prot.Write.writer1
val bin_read_t : ('a, 'a t) Bin_prot.Read.reader1
val __bin_read_t__ :
('a, int -> 'a t) Bin_prot.Read.reader1
val bin_writer_t :
('a, 'a t) Bin_prot.Type_class.S1.writer
val bin_reader_t :
('a, 'a t) Bin_prot.Type_class.S1.reader
val bin_t : ('a, 'a t) Bin_prot.Type_class.S1.t
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map : t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
val bin_size_t : t Bin_prot.Size.sizer
val bin_write_t : t Bin_prot.Write.writer
val bin_read_t : t Bin_prot.Read.reader
val __bin_read_t__ : (int -> t) Bin_prot.Read.reader
val bin_writer_t : t Bin_prot.Type_class.writer
val bin_reader_t : t Bin_prot.Type_class.reader
val bin_t : t Bin_prot.Type_class.t
end
val hash : t -> int
val hashable :
t Core_kernel.Std.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Std.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) -> 'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) -> 'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one : ('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set : ('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ -> key:'a key_ -> data:'b -> unit
val remove_multi : ('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ -> f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ -> 'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals : ('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr : ?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
val bin_size_t : ('a, 'a t) Bin_prot.Size.sizer1
val bin_write_t : ('a, 'a t) Bin_prot.Write.writer1
val bin_read_t : ('a, 'a t) Bin_prot.Read.reader1
val __bin_read_t__ :
('a, int -> 'a t) Bin_prot.Read.reader1
val bin_writer_t :
('a, 'a t) Bin_prot.Type_class.S1.writer
val bin_reader_t :
('a, 'a t) Bin_prot.Type_class.S1.reader
val bin_t : ('a, 'a t) Bin_prot.Type_class.S1.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val bin_size_t : t Bin_prot.Size.sizer
val bin_write_t : t Bin_prot.Write.writer
val bin_read_t : t Bin_prot.Read.reader
val __bin_read_t__ : (int -> t) Bin_prot.Read.reader
val bin_writer_t : t Bin_prot.Type_class.writer
val bin_reader_t : t Bin_prot.Type_class.reader
val bin_t : t Bin_prot.Type_class.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum -> f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map : 'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t -> Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove : 'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b -> f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
val zero : Bap.Std.Bil.Result.t
val succ : Bap.Std.Bil.Result.t -> Bap.Std.Bil.Result.t
end
module Value :
sig
type t = value
val to_string : t -> string
val str : unit -> t -> string
val pps : unit -> t -> string
val ppo : out_channel -> t -> unit
val pp_seq :
Format.formatter -> t Core_kernel.Std.Sequence.t -> unit
val pp : Format.formatter -> t -> unit
end
val to_string : t -> string
val str : unit -> t -> string
val pps : unit -> t -> string
val ppo : out_channel -> t -> unit
val pp_seq :
Format.formatter -> t Core_kernel.Std.Sequence.t -> unit
val pp : Format.formatter -> t -> unit
end
module Trie :
sig
type normalized_bil
val normalize :
?subst:(exp * exp) list ->
stmt list -> Bap.Std.Bil.Trie.normalized_bil
module Normalized :
sig
type 'a t
type key = normalized_bil
val create : unit -> 'a t
val add : 'a t -> key:key -> data:'a -> unit
val change :
'a t -> key -> ('a option -> 'a option) -> unit
val find : 'a t -> key -> 'a option
val walk :
'a t -> key -> init:'b -> f:('b -> 'a option -> 'b) -> 'b
val remove : 'a t -> key -> unit
val longest_match : 'a t -> key -> (int * 'a) option
val length : 'a t -> int
val pp : 'a printer -> 'a t printer
end
type 'a t
type key = stmt list
val create : unit -> 'a t
val add : 'a t -> key:key -> data:'a -> unit
val change : 'a t -> key -> ('a option -> 'a option) -> unit
val find : 'a t -> key -> 'a option
val walk :
'a t -> key -> init:'b -> f:('b -> 'a option -> 'b) -> 'b
val remove : 'a t -> key -> unit
val longest_match : 'a t -> key -> (int * 'a) option
val length : 'a t -> int
val pp : 'a printer -> 'a t printer
end
end
type bil = Bap.Std.Bil.t
type binop = Bap.Std.Bil.binop
type cast = Bap.Std.Bil.cast
type exp = Bap.Std.Bil.exp
type stmt = Bap.Std.Bil.stmt
type unop = Bap.Std.Bil.unop
type value
type dict
module Context :
sig
class t :
object ('a)
method bindings :
(Bap.Std.var * Bap.Std.Bil.result) Core_kernel.Std.Sequence.t
method lookup : Bap.Std.var -> Bap.Std.Bil.result option
method update : Bap.Std.var -> Bap.Std.Bil.result -> 'a
end
end
module Type_error :
sig
type t
val bad_mem : Bap.Std.Type_error.t
val bad_imm : Bap.Std.Type_error.t
val bad_cast : Bap.Std.Type_error.t
val bad_type :
exp:Bap.Std.typ -> got:Bap.Std.typ -> Bap.Std.Type_error.t
val to_string : t -> string
val str : unit -> t -> string
val pps : unit -> t -> string
val ppo : out_channel -> t -> unit
val pp_seq :
Format.formatter -> t Core_kernel.Std.Sequence.t -> unit
val pp : Format.formatter -> t -> unit
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val comparator :
(t, comparator_witness) Core_kernel.Comparator.comparator
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness) Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked : (Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter : 'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi : 'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a | `Right of 'a | `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness) Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list -> init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked : (Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi : 'a list t -> key:Key.t -> data:'a -> 'a list t
val change : 'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter : 'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi : 'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t -> init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t -> init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter : 'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct : ('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t * [ `Left of 'a | `Right of 'a | `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
val bin_size_t : ('a, 'a t) Bin_prot.Size.sizer1
val bin_write_t : ('a, 'a t) Bin_prot.Write.writer1
val bin_read_t : ('a, 'a t) Bin_prot.Read.reader1
val __bin_read_t__ : ('a, int -> 'a t) Bin_prot.Read.reader1
val bin_writer_t : ('a, 'a t) Bin_prot.Type_class.S1.writer
val bin_reader_t : ('a, 'a t) Bin_prot.Type_class.S1.reader
val bin_t : ('a, 'a t) Bin_prot.Type_class.S1.t
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness) Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum -> f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map : t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t = (Elt.t, Elt.comparator_witness) Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t -> init:'accum -> f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map : t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> Elt.t -> [ `Continue of 'b | `Stop of 'b ]) -> 'b
val fold_right : t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by : t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array : Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t -> f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
val bin_size_t : t Bin_prot.Size.sizer
val bin_write_t : t Bin_prot.Write.writer
val bin_read_t : t Bin_prot.Read.reader
val __bin_read_t__ : (int -> t) Bin_prot.Read.reader
val bin_writer_t : t Bin_prot.Type_class.writer
val bin_reader_t : t Bin_prot.Type_class.reader
val bin_t : t Bin_prot.Type_class.t
end
val hash : t -> int
val hashable : t Core_kernel.Std.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Std.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable : key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list -> ('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list, ('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list | `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) -> 'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) -> 'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key : ('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c -> f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ -> f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ -> f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ -> f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one : ('a, 'b list) t_ -> 'a key_ -> unit
val replace : ('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set : ('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ -> key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> unit Core_kernel.Or_error.t
val add_exn : ('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ -> 'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ -> key:'a key_ -> data:'b -> unit
val remove_multi : ('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c, ('a, 'b) t_ -> f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter : ('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ -> 'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) -> if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove : ('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals : ('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace : ('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ -> ('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ -> ('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr : ?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
val bin_size_t : ('a, 'a t) Bin_prot.Size.sizer1
val bin_write_t : ('a, 'a t) Bin_prot.Write.writer1
val bin_read_t : ('a, 'a t) Bin_prot.Read.reader1
val __bin_read_t__ : ('a, int -> 'a t) Bin_prot.Read.reader1
val bin_writer_t : ('a, 'a t) Bin_prot.Type_class.S1.writer
val bin_reader_t : ('a, 'a t) Bin_prot.Type_class.S1.reader
val bin_t : ('a, 'a t) Bin_prot.Type_class.S1.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val bin_size_t : t Bin_prot.Size.sizer
val bin_write_t : t Bin_prot.Write.writer
val bin_read_t : t Bin_prot.Read.reader
val __bin_read_t__ : (int -> t) Bin_prot.Read.reader
val bin_writer_t : t Bin_prot.Type_class.writer
val bin_reader_t : t Bin_prot.Type_class.reader
val bin_t : t Bin_prot.Type_class.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t -> init:'accum -> f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map : 'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt : 'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt : 'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t -> Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove : 'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace : 'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri : 'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t -> init:'b -> f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
end
type type_error = Bap.Std.Type_error.t
module Expi :
sig
class context :
object ('a)
method bindings :
(Bap.Std.var * Bap.Std.Bil.result) Core_kernel.Std.Sequence.t
method create_storage :
Bap.Std.Bil.storage -> 'a * Bap.Std.Bil.result
method create_undefined : 'a * Bap.Std.Bil.result
method create_word : Bap.Std.word -> 'a * Bap.Std.Bil.result
method lookup : Bap.Std.var -> Bap.Std.Bil.result option
method update : Bap.Std.var -> Bap.Std.Bil.result -> 'a
end
class ['a] t :
object
constraint 'a = #Bap.Std.Expi.context
method division_by_zero : unit -> 'a Bap.Std.Bil.Result.r
method empty : Bap.Std.Bil.storage
method eval_binop :
Bap.Std.binop ->
Bap.Std.exp -> Bap.Std.exp -> 'a Bap.Std.Bil.Result.r
method eval_cast :
Bap.Std.cast ->
Bap.Std.nat1 -> Bap.Std.exp -> 'a Bap.Std.Bil.Result.r
method eval_concat :
Bap.Std.exp -> Bap.Std.exp -> 'a Bap.Std.Bil.Result.r
method eval_exp : Bap.Std.exp -> 'a Bap.Std.Bil.Result.r
method eval_extract :
Bap.Std.nat1 ->
Bap.Std.nat1 -> Bap.Std.exp -> 'a Bap.Std.Bil.Result.r
method eval_int : Bap.Std.word -> 'a Bap.Std.Bil.Result.r
method eval_ite :
cond:Bap.Std.exp ->
yes:Bap.Std.exp -> no:Bap.Std.exp -> 'a Bap.Std.Bil.Result.r
method eval_let :
Bap.Std.var ->
Bap.Std.exp -> Bap.Std.exp -> 'a Bap.Std.Bil.Result.r
method eval_load :
mem:Bap.Std.exp ->
addr:Bap.Std.exp ->
Bap.Std.endian -> Bap.Std.size -> 'a Bap.Std.Bil.Result.r
method eval_store :
mem:Bap.Std.exp ->
addr:Bap.Std.exp ->
Bap.Std.exp ->
Bap.Std.endian -> Bap.Std.size -> 'a Bap.Std.Bil.Result.r
method eval_unknown :
string -> Bap.Std.typ -> 'a Bap.Std.Bil.Result.r
method eval_unop :
Bap.Std.unop -> Bap.Std.exp -> 'a Bap.Std.Bil.Result.r
method eval_var : Bap.Std.var -> 'a Bap.Std.Bil.Result.r
method load :
Bap.Std.Bil.storage ->
Bap.Std.addr -> 'a Bap.Std.Bil.Result.r
method lookup : Bap.Std.var -> 'a Bap.Std.Bil.Result.r
method store :
Bap.Std.Bil.storage ->
Bap.Std.addr -> Bap.Std.word -> 'a Bap.Std.Bil.Result.r
method type_error :
Bap.Std.type_error -> 'a Bap.Std.Bil.Result.r
method undefined_addr : Bap.Std.addr -> 'a Bap.Std.Bil.Result.r
method undefined_var : Bap.Std.var -> 'a Bap.Std.Bil.Result.r
method update :
Bap.Std.var -> Bap.Std.Bil.result -> 'a Bap.Std.Bil.Result.u
end
end
class ['a] expi :
object
constraint 'a = #Bap.Std.Expi.context
method division_by_zero : unit -> 'a Bil.Result.r
method empty : Bap.Std.Bil.storage
method eval_binop : binop -> exp -> exp -> 'a Bil.Result.r
method eval_cast : cast -> nat1 -> exp -> 'a Bil.Result.r
method eval_concat : exp -> exp -> 'a Bil.Result.r
method eval_exp : exp -> 'a Bil.Result.r
method eval_extract : nat1 -> nat1 -> exp -> 'a Bil.Result.r
method eval_int : word -> 'a Bil.Result.r
method eval_ite : cond:exp -> yes:exp -> no:exp -> 'a Bil.Result.r
method eval_let : var -> exp -> exp -> 'a Bil.Result.r
method eval_load :
mem:exp -> addr:exp -> endian -> size -> 'a Bil.Result.r
method eval_store :
mem:exp -> addr:exp -> exp -> endian -> size -> 'a Bil.Result.r
method eval_unknown : string -> typ -> 'a Bil.Result.r
method eval_unop : unop -> exp -> 'a Bil.Result.r
method eval_var : var -> 'a Bil.Result.r
method load : Bap.Std.Bil.storage -> addr -> 'a Bil.Result.r
method lookup : var -> 'a Bil.Result.r
method store :
Bap.Std.Bil.storage -> addr -> word -> 'a Bil.Result.r
method type_error : type_error -> 'a Bil.Result.r
method undefined_addr : addr -> 'a Bil.Result.r
method undefined_var : var -> 'a Bil.Result.r
method update : var -> Bil.result -> 'a Bil.Result.u
end
module Bili :
sig
class context :
object ('a)
method bindings :
(Bap.Std.var * Bap.Std.Bil.result) Core_kernel.Std.Sequence.t
method create_storage :
Bap.Std.Bil.storage -> 'a * Bap.Std.Bil.result
method create_undefined : 'a * Bap.Std.Bil.result
method create_word : Bap.Std.word -> 'a * Bap.Std.Bil.result
method lookup : Bap.Std.var -> Bap.Std.Bil.result option
method pc : Bap.Std.Bil.value
method update : Bap.Std.var -> Bap.Std.Bil.result -> 'a
method with_pc : Bap.Std.Bil.value -> 'a
end
class ['a] t :
object
constraint 'a = #Bap.Std.Bili.context
method division_by_zero : unit -> 'a Bil.Result.r
method empty : Bap.Std.Bil.storage
method eval : Bap.Std.stmt list -> 'a Bap.Std.Bil.Result.u
method eval_binop : binop -> exp -> exp -> 'a Bil.Result.r
method eval_cast : cast -> nat1 -> exp -> 'a Bil.Result.r
method eval_concat : exp -> exp -> 'a Bil.Result.r
method eval_cpuexn : int -> 'a Bap.Std.Bil.Result.u
method eval_exp : exp -> 'a Bil.Result.r
method eval_extract : nat1 -> nat1 -> exp -> 'a Bil.Result.r
method eval_if :
cond:Bap.Std.exp ->
yes:Bap.Std.stmt list ->
no:Bap.Std.stmt list -> 'a Bap.Std.Bil.Result.u
method eval_int : word -> 'a Bil.Result.r
method eval_ite :
cond:exp -> yes:exp -> no:exp -> 'a Bil.Result.r
method eval_jmp : Bap.Std.exp -> 'a Bap.Std.Bil.Result.u
method eval_let : var -> exp -> exp -> 'a Bil.Result.r
method eval_load :
mem:exp -> addr:exp -> endian -> size -> 'a Bil.Result.r
method eval_move :
Bap.Std.var -> Bap.Std.exp -> 'a Bap.Std.Bil.Result.u
method eval_special : string -> 'a Bap.Std.Bil.Result.u
method eval_stmt : Bap.Std.stmt -> 'a Bap.Std.Bil.Result.u
method eval_store :
mem:exp ->
addr:exp -> exp -> endian -> size -> 'a Bil.Result.r
method eval_unknown : string -> typ -> 'a Bil.Result.r
method eval_unop : unop -> exp -> 'a Bil.Result.r
method eval_var : var -> 'a Bil.Result.r
method eval_while :
cond:Bap.Std.exp ->
body:Bap.Std.stmt list -> 'a Bap.Std.Bil.Result.u
method load : Bap.Std.Bil.storage -> addr -> 'a Bil.Result.r
method lookup : var -> 'a Bil.Result.r
method store :
Bap.Std.Bil.storage -> addr -> word -> 'a Bil.Result.r
method type_error : type_error -> 'a Bil.Result.r
method undefined_addr : addr -> 'a Bil.Result.r
method undefined_var : var -> 'a Bil.Result.r
method update : var -> Bil.result -> 'a Bil.Result.u
end
end
class ['a] bili :
object
constraint 'a = #Bap.Std.Bili.context
method division_by_zero : unit -> 'a Bil.Result.r
method empty : Bap.Std.Bil.storage
method eval : stmt list -> 'a Bil.Result.u
method eval_binop : binop -> exp -> exp -> 'a Bil.Result.r
method eval_cast : cast -> nat1 -> exp -> 'a Bil.Result.r
method eval_concat : exp -> exp -> 'a Bil.Result.r
method eval_cpuexn : int -> 'a Bil.Result.u
method eval_exp : exp -> 'a Bil.Result.r
method eval_extract : nat1 -> nat1 -> exp -> 'a Bil.Result.r
method eval_if :
cond:exp -> yes:stmt list -> no:stmt list -> 'a Bil.Result.u
method eval_int : word -> 'a Bil.Result.r
method eval_ite : cond:exp -> yes:exp -> no:exp -> 'a Bil.Result.r
method eval_jmp : exp -> 'a Bil.Result.u
method eval_let : var -> exp -> exp -> 'a Bil.Result.r
method eval_load :
mem:exp -> addr:exp -> endian -> size -> 'a Bil.Result.r
method eval_move : var -> exp -> 'a Bil.Result.u
method eval_special : string -> 'a Bil.Result.u
method eval_stmt : stmt -> 'a Bil.Result.u
method eval_store :
mem:exp -> addr:exp -> exp -> endian -> size -> 'a Bil.Result.r
method eval_unknown : string -> typ -> 'a Bil.Result.r
method eval_unop : unop -> exp -> 'a Bil.Result.r
method eval_var : var -> 'a Bil.Result.r
method eval_while : cond:exp -> body:stmt list -> 'a Bil.Result.u
method load : Bap.Std.Bil.storage -> addr -> 'a Bil.Result.r
method lookup : var -> 'a Bil.Result.r
method store :
Bap.Std.Bil.storage -> addr -> word -> 'a Bil.Result.r
method type_error : type_error -> 'a Bil.Result.r
method undefined_addr : addr -> 'a Bil.Result.r
method undefined_var : var -> 'a Bil.Result.r
method update : var -> Bil.result -> 'a Bil.Result.u
end
module Exp :
sig
type t = Bap.Std.Bil.exp
val fold :
'a #Bap.Std.Bil.visitor -> init:'a -> Bap.Std.Exp.t -> 'a
val iter : unit #Bap.Std.Bil.visitor -> Bap.Std.Exp.t -> unit
val find : 'a #Bap.Std.Bil.finder -> Bap.Std.Exp.t -> 'a option
val map : #Bap.Std.Bil.mapper -> Bap.Std.Exp.t -> Bap.Std.Exp.t
val exists : unit #Bap.Std.Bil.finder -> Bap.Std.Exp.t -> bool
val is_referenced : Bap.Std.var -> Bap.Std.Exp.t -> bool
val normalize_negatives : Bap.Std.Exp.t -> Bap.Std.Exp.t
val fold_consts : Bap.Std.Exp.t -> Bap.Std.Exp.t
val fixpoint :
(Bap.Std.Exp.t -> Bap.Std.Exp.t) ->
Bap.Std.Exp.t -> Bap.Std.Exp.t
val free_vars : Bap.Std.Exp.t -> Bap.Std.Var.Set.t
val eval : Bap.Std.exp -> Bap.Std.Bil.value
val to_string : t -> string
val str : unit -> t -> string
val pps : unit -> t -> string
val ppo : out_channel -> t -> unit
val pp_seq :
Format.formatter -> t Core_kernel.Std.Sequence.t -> unit
val pp : Format.formatter -> t -> unit
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val comparator :
(t, comparator_witness) Core_kernel.Comparator.comparator
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness) Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked : (Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter : 'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi : 'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a | `Right of 'a | `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness) Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list -> init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked : (Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi : 'a list t -> key:Key.t -> data:'a -> 'a list t
val change : 'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter : 'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi : 'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t -> init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t -> init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter : 'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct : ('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t * [ `Left of 'a | `Right of 'a | `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
val bin_size_t : ('a, 'a t) Bin_prot.Size.sizer1
val bin_write_t : ('a, 'a t) Bin_prot.Write.writer1
val bin_read_t : ('a, 'a t) Bin_prot.Read.reader1
val __bin_read_t__ : ('a, int -> 'a t) Bin_prot.Read.reader1
val bin_writer_t : ('a, 'a t) Bin_prot.Type_class.S1.writer
val bin_reader_t : ('a, 'a t) Bin_prot.Type_class.S1.reader
val bin_t : ('a, 'a t) Bin_prot.Type_class.S1.t
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness) Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum -> f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map : t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t = (Elt.t, Elt.comparator_witness) Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t -> init:'accum -> f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map : t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> Elt.t -> [ `Continue of 'b | `Stop of 'b ]) -> 'b
val fold_right : t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by : t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array : Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t -> f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
val bin_size_t : t Bin_prot.Size.sizer
val bin_write_t : t Bin_prot.Write.writer
val bin_read_t : t Bin_prot.Read.reader
val __bin_read_t__ : (int -> t) Bin_prot.Read.reader
val bin_writer_t : t Bin_prot.Type_class.writer
val bin_reader_t : t Bin_prot.Type_class.reader
val bin_t : t Bin_prot.Type_class.t
end
val hash : t -> int
val hashable : t Core_kernel.Std.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Std.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable : key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list -> ('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list, ('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list | `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) -> 'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) -> 'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key : ('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c -> f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ -> f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ -> f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ -> f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one : ('a, 'b list) t_ -> 'a key_ -> unit
val replace : ('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set : ('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ -> key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> unit Core_kernel.Or_error.t
val add_exn : ('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ -> 'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ -> key:'a key_ -> data:'b -> unit
val remove_multi : ('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c, ('a, 'b) t_ -> f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter : ('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ -> 'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) -> if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove : ('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals : ('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace : ('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ -> ('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ -> ('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr : ?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
val bin_size_t : ('a, 'a t) Bin_prot.Size.sizer1
val bin_write_t : ('a, 'a t) Bin_prot.Write.writer1
val bin_read_t : ('a, 'a t) Bin_prot.Read.reader1
val __bin_read_t__ : ('a, int -> 'a t) Bin_prot.Read.reader1
val bin_writer_t : ('a, 'a t) Bin_prot.Type_class.S1.writer
val bin_reader_t : ('a, 'a t) Bin_prot.Type_class.S1.reader
val bin_t : ('a, 'a t) Bin_prot.Type_class.S1.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val bin_size_t : t Bin_prot.Size.sizer
val bin_write_t : t Bin_prot.Write.writer
val bin_read_t : t Bin_prot.Read.reader
val __bin_read_t__ : (int -> t) Bin_prot.Read.reader
val bin_writer_t : t Bin_prot.Type_class.writer
val bin_reader_t : t Bin_prot.Type_class.reader
val bin_t : t Bin_prot.Type_class.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t -> init:'accum -> f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map : 'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt : 'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt : 'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t -> Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove : 'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace : 'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri : 'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t -> init:'b -> f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
val pp_adt : Bap.Std.Exp.t Bap.Std.printer
end
module Stmt :
sig
type t = Bap.Std.Bil.stmt
val fold :
'a #Bap.Std.Bil.visitor -> init:'a -> Bap.Std.Stmt.t -> 'a
val iter : unit #Bap.Std.Bil.visitor -> Bap.Std.Stmt.t -> unit
val find : 'a #Bap.Std.Bil.finder -> Bap.Std.Stmt.t -> 'a option
val exists : unit #Bap.Std.Bil.finder -> Bap.Std.Stmt.t -> bool
val is_referenced : Bap.Std.var -> Bap.Std.Stmt.t -> bool
val fixpoint :
(Bap.Std.Stmt.t -> Bap.Std.Stmt.t) ->
Bap.Std.Stmt.t -> Bap.Std.Stmt.t
val free_vars : Bap.Std.Stmt.t -> Bap.Std.Var.Set.t
val eval :
Bap.Std.Stmt.t list -> (#Bap.Std.Bili.context as 'a) -> 'a
val to_string : t -> string
val str : unit -> t -> string
val pps : unit -> t -> string
val ppo : out_channel -> t -> unit
val pp_seq :
Format.formatter -> t Core_kernel.Std.Sequence.t -> unit
val pp : Format.formatter -> t -> unit
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val comparator :
(t, comparator_witness) Core_kernel.Comparator.comparator
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness) Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked : (Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter : 'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi : 'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a | `Right of 'a | `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness) Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list -> init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked : (Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi : 'a list t -> key:Key.t -> data:'a -> 'a list t
val change : 'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter : 'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi : 'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t -> init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t -> init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter : 'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct : ('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t * [ `Left of 'a | `Right of 'a | `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
val bin_size_t : ('a, 'a t) Bin_prot.Size.sizer1
val bin_write_t : ('a, 'a t) Bin_prot.Write.writer1
val bin_read_t : ('a, 'a t) Bin_prot.Read.reader1
val __bin_read_t__ : ('a, int -> 'a t) Bin_prot.Read.reader1
val bin_writer_t : ('a, 'a t) Bin_prot.Type_class.S1.writer
val bin_reader_t : ('a, 'a t) Bin_prot.Type_class.S1.reader
val bin_t : ('a, 'a t) Bin_prot.Type_class.S1.t
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness) Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum -> f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map : t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t = (Elt.t, Elt.comparator_witness) Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t -> init:'accum -> f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map : t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> Elt.t -> [ `Continue of 'b | `Stop of 'b ]) -> 'b
val fold_right : t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by : t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array : Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t -> f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
val bin_size_t : t Bin_prot.Size.sizer
val bin_write_t : t Bin_prot.Write.writer
val bin_read_t : t Bin_prot.Read.reader
val __bin_read_t__ : (int -> t) Bin_prot.Read.reader
val bin_writer_t : t Bin_prot.Type_class.writer
val bin_reader_t : t Bin_prot.Type_class.reader
val bin_t : t Bin_prot.Type_class.t
end
val hash : t -> int
val hashable : t Core_kernel.Std.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Std.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable : key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list -> ('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list, ('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list | `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) -> 'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) -> 'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key : ('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c -> f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ -> f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ -> f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ -> f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one : ('a, 'b list) t_ -> 'a key_ -> unit
val replace : ('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set : ('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ -> key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> unit Core_kernel.Or_error.t
val add_exn : ('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ -> 'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ -> key:'a key_ -> data:'b -> unit
val remove_multi : ('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c, ('a, 'b) t_ -> f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter : ('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ -> 'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) -> if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove : ('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals : ('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace : ('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ -> ('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ -> ('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr : ?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
val bin_size_t : ('a, 'a t) Bin_prot.Size.sizer1
val bin_write_t : ('a, 'a t) Bin_prot.Write.writer1
val bin_read_t : ('a, 'a t) Bin_prot.Read.reader1
val __bin_read_t__ : ('a, int -> 'a t) Bin_prot.Read.reader1
val bin_writer_t : ('a, 'a t) Bin_prot.Type_class.S1.writer
val bin_reader_t : ('a, 'a t) Bin_prot.Type_class.S1.reader
val bin_t : ('a, 'a t) Bin_prot.Type_class.S1.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val bin_size_t : t Bin_prot.Size.sizer
val bin_write_t : t Bin_prot.Write.writer
val bin_read_t : t Bin_prot.Read.reader
val __bin_read_t__ : (int -> t) Bin_prot.Read.reader
val bin_writer_t : t Bin_prot.Type_class.writer
val bin_reader_t : t Bin_prot.Type_class.reader
val bin_t : t Bin_prot.Type_class.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t -> init:'accum -> f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map : 'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt : 'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt : 'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t -> Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove : 'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace : 'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri : 'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t -> init:'b -> f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
val pp_adt : Bap.Std.Stmt.t Bap.Std.printer
end
module Arch :
sig
type x86 = [ `x86 | `x86_64 ]
type arm = [ `armv4 | `armv5 | `armv6 | `armv7 ]
type armeb = [ `armv4eb | `armv5eb | `armv6eb | `armv7eb ]
type thumb = [ `thumbv4 | `thumbv5 | `thumbv6 | `thumbv7 ]
type thumbeb =
[ `thumbv4eb | `thumbv5eb | `thumbv6eb | `thumbv7eb ]
type aarch64 = [ `aarch64 | `aarch64_be ]
type ppc = [ `ppc | `ppc64 | `ppc64le ]
type mips = [ `mips | `mips64 | `mips64el | `mipsel ]
type sparc = [ `sparc | `sparcv9 ]
type nvptx = [ `nvptx | `nvptx64 ]
type hexagon = [ `hexagon ]
type r600 = [ `r600 ]
type systemz = [ `systemz ]
type xcore = [ `xcore ]
type t =
[ `aarch64
| `aarch64_be
| `armv4
| `armv4eb
| `armv5
| `armv5eb
| `armv6
| `armv6eb
| `armv7
| `armv7eb
| `hexagon
| `mips
| `mips64
| `mips64el
| `mipsel
| `nvptx
| `nvptx64
| `ppc
| `ppc64
| `ppc64le
| `r600
| `sparc
| `sparcv9
| `systemz
| `thumbv4
| `thumbv4eb
| `thumbv5
| `thumbv5eb
| `thumbv6
| `thumbv6eb
| `thumbv7
| `thumbv7eb
| `x86
| `x86_64
| `xcore ]
val of_string : string -> Bap.Std.Arch.t option
val addr_size : Bap.Std.Arch.t -> Bap.Std.addr_size
val endian : Bap.Std.Arch.t -> Bap.Std.endian
val to_string : t -> string
val str : unit -> t -> string
val pps : unit -> t -> string
val ppo : out_channel -> t -> unit
val pp_seq :
Format.formatter -> t Core_kernel.Std.Sequence.t -> unit
val pp : Format.formatter -> t -> unit
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val comparator :
(t, comparator_witness) Core_kernel.Comparator.comparator
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness) Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked : (Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter : 'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi : 'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a | `Right of 'a | `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness) Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list -> init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked : (Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi : 'a list t -> key:Key.t -> data:'a -> 'a list t
val change : 'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter : 'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi : 'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t -> init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t -> init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter : 'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct : ('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t * [ `Left of 'a | `Right of 'a | `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
val bin_size_t : ('a, 'a t) Bin_prot.Size.sizer1
val bin_write_t : ('a, 'a t) Bin_prot.Write.writer1
val bin_read_t : ('a, 'a t) Bin_prot.Read.reader1
val __bin_read_t__ : ('a, int -> 'a t) Bin_prot.Read.reader1
val bin_writer_t : ('a, 'a t) Bin_prot.Type_class.S1.writer
val bin_reader_t : ('a, 'a t) Bin_prot.Type_class.S1.reader
val bin_t : ('a, 'a t) Bin_prot.Type_class.S1.t
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness) Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum -> f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map : t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t = (Elt.t, Elt.comparator_witness) Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t -> init:'accum -> f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map : t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> Elt.t -> [ `Continue of 'b | `Stop of 'b ]) -> 'b
val fold_right : t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by : t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array : Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t -> f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
val bin_size_t : t Bin_prot.Size.sizer
val bin_write_t : t Bin_prot.Write.writer
val bin_read_t : t Bin_prot.Read.reader
val __bin_read_t__ : (int -> t) Bin_prot.Read.reader
val bin_writer_t : t Bin_prot.Type_class.writer
val bin_reader_t : t Bin_prot.Type_class.reader
val bin_t : t Bin_prot.Type_class.t
end
val hash : t -> int
val hashable : t Core_kernel.Std.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Std.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable : key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list -> ('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list, ('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list | `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) -> 'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) -> 'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key : ('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c -> f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ -> f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ -> f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ -> f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one : ('a, 'b list) t_ -> 'a key_ -> unit
val replace : ('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set : ('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ -> key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> unit Core_kernel.Or_error.t
val add_exn : ('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ -> 'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ -> key:'a key_ -> data:'b -> unit
val remove_multi : ('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c, ('a, 'b) t_ -> f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter : ('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ -> 'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) -> if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove : ('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals : ('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace : ('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ -> ('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ -> ('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr : ?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
val bin_size_t : ('a, 'a t) Bin_prot.Size.sizer1
val bin_write_t : ('a, 'a t) Bin_prot.Write.writer1
val bin_read_t : ('a, 'a t) Bin_prot.Read.reader1
val __bin_read_t__ : ('a, int -> 'a t) Bin_prot.Read.reader1
val bin_writer_t : ('a, 'a t) Bin_prot.Type_class.S1.writer
val bin_reader_t : ('a, 'a t) Bin_prot.Type_class.S1.reader
val bin_t : ('a, 'a t) Bin_prot.Type_class.S1.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val bin_size_t : t Bin_prot.Size.sizer
val bin_write_t : t Bin_prot.Write.writer
val bin_read_t : t Bin_prot.Read.reader
val __bin_read_t__ : (int -> t) Bin_prot.Read.reader
val bin_writer_t : t Bin_prot.Type_class.writer
val bin_reader_t : t Bin_prot.Type_class.reader
val bin_t : t Bin_prot.Type_class.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t -> init:'accum -> f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map : 'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt : 'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt : 'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t -> Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove : 'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace : 'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri : 'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t -> init:'b -> f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
end
type arch = Bap.Std.Arch.t
module Value :
sig
type t = Bap.Std.value
type 'a tag
module type S =
sig
type t
val pp : Format.formatter -> Bap.Std.Value.S.t -> unit
end
type void
type literal =
(Bap.Std.Value.void, Bap.Std.Value.void, Bap.Std.Value.void)
Pervasives.format
type typeid
val create : 'a Bap.Std.Value.tag -> 'a -> Bap.Std.Value.t
val is : 'a Bap.Std.Value.tag -> Bap.Std.Value.t -> bool
val get : 'a Bap.Std.Value.tag -> Bap.Std.Value.t -> 'a option
val get_exn : 'a Bap.Std.Value.tag -> Bap.Std.Value.t -> 'a
val tagname : Bap.Std.Value.t -> string
module Tag :
sig
type 'a t = 'a Bap.Std.Value.tag
val register :
name:Bap.Std.Value.literal ->
uuid:Bap.Std.Value.literal ->
(module Bap.Std.Value.S with type t = 'a) ->
'a Bap.Std.Value.tag
val name : 'a Bap.Std.Value.Tag.t -> string
val same :
'a Bap.Std.Value.Tag.t -> 'b Bap.Std.Value.Tag.t -> bool
val same_witness :
'a Bap.Std.Value.Tag.t ->
'b Bap.Std.Value.Tag.t ->
('a, 'b) Core_kernel.Std.Type_equal.t option
val same_witness_exn :
'a Bap.Std.Value.Tag.t ->
'b Bap.Std.Value.Tag.t ->
('a, 'b) Core_kernel.Std.Type_equal.t
end
module Match :
sig
type 'a t
val switch : Bap.Std.value -> 's Bap.Std.Value.Match.t -> 's
val select : 's Bap.Std.Value.Match.t -> Bap.Std.value -> 's
val case :
'a Bap.Std.Value.tag ->
('a -> 's) ->
's Bap.Std.Value.Match.t -> 's Bap.Std.Value.Match.t
val default : (unit -> 's) -> 's Bap.Std.Value.Match.t
end
module Typeid :
sig
type t = typeid
val to_string : t -> string
val str : unit -> t -> string
val pps : unit -> t -> string
val ppo : out_channel -> t -> unit
val pp_seq :
Format.formatter -> t Core_kernel.Std.Sequence.t -> unit
val pp : Format.formatter -> t -> unit
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val comparator :
(t, comparator_witness) Core_kernel.Comparator.comparator
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a | `Right of 'a | `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked : (Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter : 'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi : 'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a | `Right of 'a | `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
val bin_size_t : ('a, 'a t) Bin_prot.Size.sizer1
val bin_write_t : ('a, 'a t) Bin_prot.Write.writer1
val bin_read_t : ('a, 'a t) Bin_prot.Read.reader1
val __bin_read_t__ :
('a, int -> 'a t) Bin_prot.Read.reader1
val bin_writer_t : ('a, 'a t) Bin_prot.Type_class.S1.writer
val bin_reader_t : ('a, 'a t) Bin_prot.Type_class.S1.reader
val bin_t : ('a, 'a t) Bin_prot.Type_class.S1.t
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map : t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness) Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum -> f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map : t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t -> f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
val bin_size_t : t Bin_prot.Size.sizer
val bin_write_t : t Bin_prot.Write.writer
val bin_read_t : t Bin_prot.Read.reader
val __bin_read_t__ : (int -> t) Bin_prot.Read.reader
val bin_writer_t : t Bin_prot.Type_class.writer
val bin_reader_t : t Bin_prot.Type_class.reader
val bin_t : t Bin_prot.Type_class.t
end
val hash : t -> int
val hashable : t Core_kernel.Std.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Std.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable : key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list | `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) -> 'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) -> 'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key : ('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c -> f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ -> f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ -> f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ -> f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one : ('a, 'b list) t_ -> 'a key_ -> unit
val replace : ('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set : ('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> unit Core_kernel.Or_error.t
val add_exn : ('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ -> key:'a key_ -> data:'b -> unit
val remove_multi : ('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c, ('a, 'b) t_ -> f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter : ('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ -> 'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) -> if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove : ('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals : ('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace : ('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ -> ('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr : ?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
val bin_size_t : ('a, 'a t) Bin_prot.Size.sizer1
val bin_write_t : ('a, 'a t) Bin_prot.Write.writer1
val bin_read_t : ('a, 'a t) Bin_prot.Read.reader1
val __bin_read_t__ :
('a, int -> 'a t) Bin_prot.Read.reader1
val bin_writer_t : ('a, 'a t) Bin_prot.Type_class.S1.writer
val bin_reader_t : ('a, 'a t) Bin_prot.Type_class.S1.reader
val bin_t : ('a, 'a t) Bin_prot.Type_class.S1.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val bin_size_t : t Bin_prot.Size.sizer
val bin_write_t : t Bin_prot.Write.writer
val bin_read_t : t Bin_prot.Read.reader
val __bin_read_t__ : (int -> t) Bin_prot.Read.reader
val bin_writer_t : t Bin_prot.Type_class.writer
val bin_reader_t : t Bin_prot.Type_class.reader
val bin_t : t Bin_prot.Type_class.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum -> f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map : 'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt : 'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt : 'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t -> Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove : 'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace : 'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b -> f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
end
val to_string : t -> string
val str : unit -> t -> string
val pps : unit -> t -> string
val ppo : out_channel -> t -> unit
val pp_seq :
Format.formatter -> t Core_kernel.Std.Sequence.t -> unit
val pp : Format.formatter -> t -> unit
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val comparator :
(t, comparator_witness) Core_kernel.Comparator.comparator
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness) Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked : (Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter : 'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi : 'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a | `Right of 'a | `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness) Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list -> init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked : (Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi : 'a list t -> key:Key.t -> data:'a -> 'a list t
val change : 'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter : 'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi : 'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t -> init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t -> init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter : 'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct : ('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t * [ `Left of 'a | `Right of 'a | `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
val bin_size_t : ('a, 'a t) Bin_prot.Size.sizer1
val bin_write_t : ('a, 'a t) Bin_prot.Write.writer1
val bin_read_t : ('a, 'a t) Bin_prot.Read.reader1
val __bin_read_t__ : ('a, int -> 'a t) Bin_prot.Read.reader1
val bin_writer_t : ('a, 'a t) Bin_prot.Type_class.S1.writer
val bin_reader_t : ('a, 'a t) Bin_prot.Type_class.S1.reader
val bin_t : ('a, 'a t) Bin_prot.Type_class.S1.t
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness) Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum -> f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map : t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t = (Elt.t, Elt.comparator_witness) Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t -> init:'accum -> f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map : t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> Elt.t -> [ `Continue of 'b | `Stop of 'b ]) -> 'b
val fold_right : t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by : t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array : Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t -> f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
val bin_size_t : t Bin_prot.Size.sizer
val bin_write_t : t Bin_prot.Write.writer
val bin_read_t : t Bin_prot.Read.reader
val __bin_read_t__ : (int -> t) Bin_prot.Read.reader
val bin_writer_t : t Bin_prot.Type_class.writer
val bin_reader_t : t Bin_prot.Type_class.reader
val bin_t : t Bin_prot.Type_class.t
end
val hash : t -> int
val hashable : t Core_kernel.Std.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Std.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable : key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list -> ('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list, ('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list | `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) -> 'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) -> 'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key : ('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c -> f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ -> f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ -> f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ -> f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one : ('a, 'b list) t_ -> 'a key_ -> unit
val replace : ('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set : ('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ -> key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> unit Core_kernel.Or_error.t
val add_exn : ('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ -> 'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ -> key:'a key_ -> data:'b -> unit
val remove_multi : ('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c, ('a, 'b) t_ -> f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter : ('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ -> 'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) -> if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove : ('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals : ('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace : ('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ -> ('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ -> ('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr : ?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
val bin_size_t : ('a, 'a t) Bin_prot.Size.sizer1
val bin_write_t : ('a, 'a t) Bin_prot.Write.writer1
val bin_read_t : ('a, 'a t) Bin_prot.Read.reader1
val __bin_read_t__ : ('a, int -> 'a t) Bin_prot.Read.reader1
val bin_writer_t : ('a, 'a t) Bin_prot.Type_class.S1.writer
val bin_reader_t : ('a, 'a t) Bin_prot.Type_class.S1.reader
val bin_t : ('a, 'a t) Bin_prot.Type_class.S1.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val bin_size_t : t Bin_prot.Size.sizer
val bin_write_t : t Bin_prot.Write.writer
val bin_read_t : t Bin_prot.Read.reader
val __bin_read_t__ : (int -> t) Bin_prot.Read.reader
val bin_writer_t : t Bin_prot.Type_class.writer
val bin_reader_t : t Bin_prot.Type_class.reader
val bin_t : t Bin_prot.Type_class.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t -> init:'accum -> f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map : 'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt : 'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt : 'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t -> Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove : 'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace : 'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri : 'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t -> init:'b -> f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
end
type 'a tag = 'a Bap.Std.Value.tag
type color =
[ `black
| `blue
| `cyan
| `green
| `magenta
| `red
| `white
| `yellow ]
val color : Bap.Std.color Bap.Std.tag
val comment : string Bap.Std.tag
val python : string Bap.Std.tag
val shell : string Bap.Std.tag
val mark : unit Bap.Std.tag
val weight : float Bap.Std.tag
val target_addr : Bap.Std.addr Bap.Std.tag
val target_name : string Bap.Std.tag
val subroutine_name : string Bap.Std.tag
val subroutine_addr : Bap.Std.addr Bap.Std.tag
val filename : string Bap.Std.tag
module Dict :
sig
type t = Bap.Std.dict
val empty : Bap.Std.Dict.t
val is_empty : Bap.Std.Dict.t -> bool
val set : Bap.Std.Dict.t -> 'a Bap.Std.tag -> 'a -> Bap.Std.Dict.t
val mem : Bap.Std.Dict.t -> 'a Bap.Std.tag -> bool
val find : Bap.Std.Dict.t -> 'a Bap.Std.tag -> 'a option
val add :
Bap.Std.Dict.t ->
'a Bap.Std.tag -> 'a -> [ `Duplicate | `Ok of Bap.Std.Dict.t ]
val change :
Bap.Std.Dict.t ->
'a Bap.Std.tag -> ('a option -> 'a option) -> Bap.Std.Dict.t
val remove : Bap.Std.Dict.t -> 'a Bap.Std.tag -> Bap.Std.Dict.t
val data : Bap.Std.Dict.t -> Bap.Std.Value.t Bap.Std.seq
end
type 'a vector
module Vector :
sig
type 'a t = 'a Bap.Std.vector
val create : ?capacity:int -> 'a -> 'a Bap.Std.Vector.t
val append : 'a Bap.Std.Vector.t -> 'a -> unit
val nth : 'a Bap.Std.Vector.t -> int -> 'a option
val get : 'a Bap.Std.Vector.t -> int -> 'a
val set : 'a Bap.Std.Vector.t -> int -> 'a -> unit
val map_to_array : 'a Bap.Std.Vector.t -> f:('a -> 'b) -> 'b array
val mem : ?equal:('a -> 'a -> bool) -> 'a t -> 'a -> bool
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t -> init:'accum -> f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map : 'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt : 'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt : 'a t -> cmp:('a -> 'a -> int) -> 'a option
end
type 'a term
type program
type sub
type arg
type blk
type phi
type def
type jmp
type tid
type call
type label = Direct of Bap.Std.tid | Indirect of Bap.Std.exp
type jmp_kind =
Call of Bap.Std.call
| Goto of Bap.Std.label
| Ret of Bap.Std.label
| Int of int * Bap.Std.tid
type intent = In | Out | Both
type ('a, 'b) cls
val sub_t : (Bap.Std.program, Bap.Std.sub) Bap.Std.cls
val arg_t : (Bap.Std.sub, Bap.Std.arg) Bap.Std.cls
val blk_t : (Bap.Std.sub, Bap.Std.blk) Bap.Std.cls
val phi_t : (Bap.Std.blk, Bap.Std.phi) Bap.Std.cls
val def_t : (Bap.Std.blk, Bap.Std.def) Bap.Std.cls
val jmp_t : (Bap.Std.blk, Bap.Std.jmp) Bap.Std.cls
module type Node =
sig
type t
type graph
type label
type edge
val create : Bap.Std.Node.label -> Bap.Std.Node.t
val label : Bap.Std.Node.t -> Bap.Std.Node.label
val mem : Bap.Std.Node.t -> Bap.Std.Node.graph -> bool
val succs :
Bap.Std.Node.t ->
Bap.Std.Node.graph -> Bap.Std.Node.t Bap.Std.seq
val preds :
Bap.Std.Node.t ->
Bap.Std.Node.graph -> Bap.Std.Node.t Bap.Std.seq
val inputs :
Bap.Std.Node.t ->
Bap.Std.Node.graph -> Bap.Std.Node.edge Bap.Std.seq
val outputs :
Bap.Std.Node.t ->
Bap.Std.Node.graph -> Bap.Std.Node.edge Bap.Std.seq
val degree :
?dir:[ `In | `Out ] ->
Bap.Std.Node.t -> Bap.Std.Node.graph -> int
val insert :
Bap.Std.Node.t -> Bap.Std.Node.graph -> Bap.Std.Node.graph
val update :
Bap.Std.Node.t ->
Bap.Std.Node.label -> Bap.Std.Node.graph -> Bap.Std.Node.graph
val remove :
Bap.Std.Node.t -> Bap.Std.Node.graph -> Bap.Std.Node.graph
val has_edge :
Bap.Std.Node.t -> Bap.Std.Node.t -> Bap.Std.Node.graph -> bool
val edge :
Bap.Std.Node.t ->
Bap.Std.Node.t -> Bap.Std.Node.graph -> Bap.Std.Node.edge option
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness) Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness) Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked : (Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter : 'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi : 'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a | `Right of 'a | `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness) Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list -> init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked : (Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi : 'a list t -> key:Key.t -> data:'a -> 'a list t
val change : 'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter : 'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi : 'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t -> init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t -> init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter : 'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct : ('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t * [ `Left of 'a | `Right of 'a | `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness) Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum -> f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map : t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t = (Elt.t, Elt.comparator_witness) Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t -> init:'accum -> f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map : t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> Elt.t -> [ `Continue of 'b | `Stop of 'b ]) -> 'b
val fold_right : t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by : t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array : Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t -> f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable : t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl = ('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable : key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list -> ('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list, ('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list | `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) -> 'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) -> 'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key : ('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c -> f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ -> f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ -> f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ -> f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one : ('a, 'b list) t_ -> 'a key_ -> unit
val replace : ('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set : ('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ -> key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> unit Core_kernel.Or_error.t
val add_exn : ('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ -> 'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ -> key:'a key_ -> data:'b -> unit
val remove_multi : ('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c, ('a, 'b) t_ -> f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter : ('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ -> 'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) -> if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove : ('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals : ('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace : ('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ -> ('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ -> ('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr : ?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t -> init:'accum -> f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map : 'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt : 'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt : 'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t -> Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove : 'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace : 'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri : 'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t -> init:'b -> f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
end
module type Edge =
sig
type t
type node
type graph
type label
val create :
Bap.Std.Edge.node ->
Bap.Std.Edge.node -> Bap.Std.Edge.label -> Bap.Std.Edge.t
val label : Bap.Std.Edge.t -> Bap.Std.Edge.label
val src : Bap.Std.Edge.t -> Bap.Std.Edge.node
val dst : Bap.Std.Edge.t -> Bap.Std.Edge.node
val mem : Bap.Std.Edge.t -> Bap.Std.Edge.graph -> bool
val insert :
Bap.Std.Edge.t -> Bap.Std.Edge.graph -> Bap.Std.Edge.graph
val update :
Bap.Std.Edge.t ->
Bap.Std.Edge.label -> Bap.Std.Edge.graph -> Bap.Std.Edge.graph
val remove :
Bap.Std.Edge.t -> Bap.Std.Edge.graph -> Bap.Std.Edge.graph
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness) Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness) Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked : (Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter : 'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi : 'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a | `Right of 'a | `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness) Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list -> init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked : (Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi : 'a list t -> key:Key.t -> data:'a -> 'a list t
val change : 'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter : 'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi : 'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t -> init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t -> init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter : 'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct : ('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t * [ `Left of 'a | `Right of 'a | `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness) Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum -> f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map : t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t = (Elt.t, Elt.comparator_witness) Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t -> init:'accum -> f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map : t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> Elt.t -> [ `Continue of 'b | `Stop of 'b ]) -> 'b
val fold_right : t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by : t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array : Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t -> f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable : t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl = ('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable : key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list -> ('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list, ('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list | `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) -> 'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) -> 'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key : ('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c -> f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ -> f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ -> f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ -> f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one : ('a, 'b list) t_ -> 'a key_ -> unit
val replace : ('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set : ('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ -> key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> unit Core_kernel.Or_error.t
val add_exn : ('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ -> 'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ -> key:'a key_ -> data:'b -> unit
val remove_multi : ('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c, ('a, 'b) t_ -> f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter : ('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ -> 'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) -> if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove : ('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals : ('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace : ('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ -> ('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ -> ('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr : ?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t -> init:'accum -> f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map : 'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt : 'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt : 'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t -> Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove : 'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace : 'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri : 'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t -> init:'b -> f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
end
module Biri :
sig
class context :
Bap.Std.program Bap.Std.term ->
object ('a)
method bindings :
(Bap.Std.var * Bap.Std.Bil.result) Core_kernel.Std.Sequence.t
method create_storage :
Bap.Std.Bil.storage -> 'a * Bap.Std.Bil.result
method create_undefined : 'a * Bap.Std.Bil.result
method create_word : Bap.Std.word -> 'a * Bap.Std.Bil.result
method enter_term : Bap.Std.tid -> 'a
method lookup : Bap.Std.var -> Bap.Std.Bil.result option
method next : Bap.Std.tid option
method program : Bap.Std.program Bap.Std.term
method set_next : Bap.Std.tid option -> 'a
method trace : Bap.Std.tid list
method update : Bap.Std.var -> Bap.Std.Bil.result -> 'a
end
class ['a] t :
object
constraint 'a = #Bap.Std.Biri.context
method division_by_zero : unit -> 'a Bil.Result.r
method empty : Bap.Std.Bil.storage
method enter_term :
('p, 't) Bap.Std.cls ->
't Bap.Std.term -> 'a Bap.Std.Bil.Result.u
method eval_arg :
Bap.Std.arg Bap.Std.term -> 'a Bap.Std.Bil.Result.u
method eval_binop : binop -> exp -> exp -> 'a Bil.Result.r
method eval_blk :
Bap.Std.blk Bap.Std.term -> 'a Bap.Std.Bil.Result.u
method eval_call : Bap.Std.call -> 'a Bap.Std.Bil.Result.u
method eval_cast : cast -> nat1 -> exp -> 'a Bil.Result.r
method eval_concat : exp -> exp -> 'a Bil.Result.r
method eval_def :
Bap.Std.def Bap.Std.term -> 'a Bap.Std.Bil.Result.u
method eval_direct : Bap.Std.tid -> 'a Bap.Std.Bil.Result.u
method eval_exn : int -> Bap.Std.tid -> 'a Bap.Std.Bil.Result.u
method eval_exp : exp -> 'a Bil.Result.r
method eval_extract : nat1 -> nat1 -> exp -> 'a Bil.Result.r
method eval_goto : Bap.Std.label -> 'a Bap.Std.Bil.Result.u
method eval_indirect : Bap.Std.exp -> 'a Bap.Std.Bil.Result.u
method eval_int : word -> 'a Bil.Result.r
method eval_ite :
cond:exp -> yes:exp -> no:exp -> 'a Bil.Result.r
method eval_jmp :
Bap.Std.jmp Bap.Std.term -> 'a Bap.Std.Bil.Result.u
method eval_let : var -> exp -> exp -> 'a Bil.Result.r
method eval_load :
mem:exp -> addr:exp -> endian -> size -> 'a Bil.Result.r
method eval_phi :
Bap.Std.phi Bap.Std.term -> 'a Bap.Std.Bil.Result.u
method eval_ret : Bap.Std.label -> 'a Bap.Std.Bil.Result.u
method eval_store :
mem:exp ->
addr:exp -> exp -> endian -> size -> 'a Bil.Result.r
method eval_sub :
Bap.Std.sub Bap.Std.term -> 'a Bap.Std.Bil.Result.u
method eval_unknown : string -> typ -> 'a Bil.Result.r
method eval_unop : unop -> exp -> 'a Bil.Result.r
method eval_var : var -> 'a Bil.Result.r
method leave_term :
('p, 't) Bap.Std.cls ->
't Bap.Std.term -> 'a Bap.Std.Bil.Result.u
method load : Bap.Std.Bil.storage -> addr -> 'a Bil.Result.r
method lookup : var -> 'a Bil.Result.r
method store :
Bap.Std.Bil.storage -> addr -> word -> 'a Bil.Result.r
method type_error : type_error -> 'a Bil.Result.r
method undefined_addr : addr -> 'a Bil.Result.r
method undefined_var : var -> 'a Bil.Result.r
method update : var -> Bil.result -> 'a Bil.Result.u
end
end
class ['a] biri :
object
constraint 'a = #Bap.Std.Biri.context
method division_by_zero : unit -> 'a Bil.Result.r
method empty : Bap.Std.Bil.storage
method enter_term : ('p, 't) cls -> 't term -> 'a Bil.Result.u
method eval_arg : arg term -> 'a Bil.Result.u
method eval_binop : binop -> exp -> exp -> 'a Bil.Result.r
method eval_blk : blk term -> 'a Bil.Result.u
method eval_call : call -> 'a Bil.Result.u
method eval_cast : cast -> nat1 -> exp -> 'a Bil.Result.r
method eval_concat : exp -> exp -> 'a Bil.Result.r
method eval_def : def term -> 'a Bil.Result.u
method eval_direct : tid -> 'a Bil.Result.u
method eval_exn : int -> tid -> 'a Bil.Result.u
method eval_exp : exp -> 'a Bil.Result.r
method eval_extract : nat1 -> nat1 -> exp -> 'a Bil.Result.r
method eval_goto : label -> 'a Bil.Result.u
method eval_indirect : exp -> 'a Bil.Result.u
method eval_int : word -> 'a Bil.Result.r
method eval_ite : cond:exp -> yes:exp -> no:exp -> 'a Bil.Result.r
method eval_jmp : jmp term -> 'a Bil.Result.u
method eval_let : var -> exp -> exp -> 'a Bil.Result.r
method eval_load :
mem:exp -> addr:exp -> endian -> size -> 'a Bil.Result.r
method eval_phi : phi term -> 'a Bil.Result.u
method eval_ret : label -> 'a Bil.Result.u
method eval_store :
mem:exp -> addr:exp -> exp -> endian -> size -> 'a Bil.Result.r
method eval_sub : sub term -> 'a Bil.Result.u
method eval_unknown : string -> typ -> 'a Bil.Result.r
method eval_unop : unop -> exp -> 'a Bil.Result.r
method eval_var : var -> 'a Bil.Result.r
method leave_term : ('p, 't) cls -> 't term -> 'a Bil.Result.u
method load : Bap.Std.Bil.storage -> addr -> 'a Bil.Result.r
method lookup : var -> 'a Bil.Result.r
method store :
Bap.Std.Bil.storage -> addr -> word -> 'a Bil.Result.r
method type_error : type_error -> 'a Bil.Result.r
method undefined_addr : addr -> 'a Bil.Result.r
method undefined_var : var -> 'a Bil.Result.r
method update : var -> Bil.result -> 'a Bil.Result.u
end
module type Graph =
sig
type t
type node
type edge
module Node :
sig
type t = node
type graph = t
type label
type edge = edge
val create : label -> t
val label : t -> label
val mem : t -> graph -> bool
val succs : t -> graph -> t seq
val preds : t -> graph -> t seq
val inputs : t -> graph -> edge seq
val outputs : t -> graph -> edge seq
val degree : ?dir:[ `In | `Out ] -> t -> graph -> int
val insert : t -> graph -> graph
val update : t -> label -> graph -> graph
val remove : t -> graph -> graph
val has_edge : t -> t -> graph -> bool
val edge : t -> t -> graph -> edge option
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness) Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a | `Right of 'a | `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked : (Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter : 'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi : 'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a | `Right of 'a | `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map : t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness) Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum -> f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map : t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t -> f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable : t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable : key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list | `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) -> 'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) -> 'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key : ('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c -> f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ -> f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ -> f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ -> f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one : ('a, 'b list) t_ -> 'a key_ -> unit
val replace : ('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set : ('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> unit Core_kernel.Or_error.t
val add_exn : ('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ -> key:'a key_ -> data:'b -> unit
val remove_multi : ('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c, ('a, 'b) t_ -> f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter : ('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ -> 'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) -> if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove : ('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals : ('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace : ('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ -> ('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr : ?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum -> f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map : 'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt : 'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt : 'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t -> Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove : 'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace : 'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b -> f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
end
module Edge :
sig
type t = edge
type node = node
type graph = t
type label
val create : node -> node -> label -> t
val label : t -> label
val src : t -> node
val dst : t -> node
val mem : t -> graph -> bool
val insert : t -> graph -> graph
val update : t -> label -> graph -> graph
val remove : t -> graph -> graph
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness) Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a | `Right of 'a | `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked : (Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter : 'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi : 'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a | `Right of 'a | `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map : t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness) Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum -> f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map : t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t -> f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable : t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable : key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list | `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) -> 'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) -> 'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key : ('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c -> f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ -> f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ -> f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ -> f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one : ('a, 'b list) t_ -> 'a key_ -> unit
val replace : ('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set : ('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> unit Core_kernel.Or_error.t
val add_exn : ('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ -> key:'a key_ -> data:'b -> unit
val remove_multi : ('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c, ('a, 'b) t_ -> f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter : ('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ -> 'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) -> if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove : ('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals : ('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace : ('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ -> ('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr : ?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum -> f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map : 'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt : 'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt : 'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t -> Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove : 'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace : 'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b -> f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
end
val empty : Bap.Std.Graph.t
val nodes : Bap.Std.Graph.t -> Bap.Std.Graph.node Bap.Std.seq
val edges : Bap.Std.Graph.t -> Bap.Std.Graph.edge Bap.Std.seq
val is_directed : bool
val number_of_edges : Bap.Std.Graph.t -> int
val number_of_nodes : Bap.Std.Graph.t -> int
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness) Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness) Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked : (Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter : 'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi : 'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a | `Right of 'a | `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness) Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list -> init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked : (Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi : 'a list t -> key:Key.t -> data:'a -> 'a list t
val change : 'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter : 'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi : 'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t -> init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t -> init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter : 'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct : ('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t * [ `Left of 'a | `Right of 'a | `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness) Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum -> f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map : t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t = (Elt.t, Elt.comparator_witness) Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t -> init:'accum -> f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map : t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> Elt.t -> [ `Continue of 'b | `Stop of 'b ]) -> 'b
val fold_right : t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by : t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array : Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t -> f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable : t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl = ('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable : key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list -> ('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list, ('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list | `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) -> 'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) -> 'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key : ('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c -> f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ -> f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ -> f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ -> f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one : ('a, 'b list) t_ -> 'a key_ -> unit
val replace : ('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set : ('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ -> key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> unit Core_kernel.Or_error.t
val add_exn : ('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ -> 'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ -> key:'a key_ -> data:'b -> unit
val remove_multi : ('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c, ('a, 'b) t_ -> f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter : ('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ -> 'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) -> if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove : ('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals : ('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace : ('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ -> ('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ -> ('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr : ?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t -> init:'accum -> f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map : 'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt : 'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt : 'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t -> Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove : 'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace : 'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri : 'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t -> init:'b -> f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
val to_string : t -> string
val str : unit -> t -> string
val pps : unit -> t -> string
val ppo : out_channel -> t -> unit
val pp_seq :
Format.formatter -> t Core_kernel.Std.Sequence.t -> unit
val pp : Format.formatter -> t -> unit
end
type ('c, 'n, 'e) graph =
(module Bap.Std.Graph with type edge = 'e and type node = 'n and type t = 'c)
type edge_kind = [ `Back | `Cross | `Forward | `Tree ]
type 'a tree
type 'a frontier
type 'a partition
type 'a group
type 'a path
type equiv
module Tree :
sig
type 'a t = 'a Bap.Std.tree
val children : 'a Bap.Std.Tree.t -> 'a -> 'a Bap.Std.seq
val parent : 'a Bap.Std.Tree.t -> 'a -> 'a option
val ancestors : 'a Bap.Std.Tree.t -> 'a -> 'a Bap.Std.seq
val descendants : 'a Bap.Std.Tree.t -> 'a -> 'a Bap.Std.seq
val is_child_of : 'a Bap.Std.Tree.t -> parent:'a -> 'a -> bool
val is_ancestor_of : 'a Bap.Std.Tree.t -> child:'a -> 'a -> bool
val is_descendant_of : 'a Bap.Std.Tree.t -> parent:'a -> 'a -> bool
val to_sequence : 'a Bap.Std.Tree.t -> 'a Bap.Std.seq
val pp : 'a Bap.Std.printer -> 'a Bap.Std.Tree.t Bap.Std.printer
end
module Frontier :
sig
type 'a t = 'a Bap.Std.frontier
val enum : 'a Bap.Std.Frontier.t -> 'a -> 'a Bap.Std.seq
val mem : 'a Bap.Std.Frontier.t -> 'a -> 'a -> bool
val to_sequence : 'a Bap.Std.Frontier.t -> 'a Bap.Std.seq
val pp :
'a Bap.Std.printer -> 'a Bap.Std.Frontier.t Bap.Std.printer
end
module Path :
sig
type 'e t = 'e Bap.Std.path
val start : 'e Bap.Std.Path.t -> 'e
val finish : 'e Bap.Std.Path.t -> 'e
val edges : 'e Bap.Std.Path.t -> 'e Bap.Std.seq
val edges_rev : 'e Bap.Std.Path.t -> 'e Bap.Std.seq
val weight : 'e Bap.Std.Path.t -> int
val length : 'e Bap.Std.Path.t -> int
val pp : 'a Bap.Std.printer -> 'a Bap.Std.Path.t Bap.Std.printer
end
module Partition :
sig
type 'a t = 'a Bap.Std.partition
val groups : 'a Bap.Std.Partition.t -> 'a Bap.Std.group Bap.Std.seq
val group : 'a Bap.Std.Partition.t -> 'a -> 'a Bap.Std.group option
val equiv : 'a Bap.Std.Partition.t -> 'a -> 'a -> bool
val number_of_groups : 'a Bap.Std.Partition.t -> int
val of_equiv :
'a Bap.Std.Partition.t ->
Bap.Std.equiv -> 'a Bap.Std.group option
end
module Group :
sig
type 'a t = 'a Bap.Std.group
val enum : 'a Bap.Std.group -> 'a Bap.Std.seq
val mem : 'a Bap.Std.group -> 'a -> bool
val top : 'a Bap.Std.group -> 'a
val to_equiv : 'a Bap.Std.group -> Bap.Std.equiv
end
module Equiv :
sig
type t
val to_int : Bap.Std.Equiv.t -> int
val to_string : t -> string
val str : unit -> t -> string
val pps : unit -> t -> string
val ppo : out_channel -> t -> unit
val pp_seq :
Format.formatter -> t Core_kernel.Std.Sequence.t -> unit
val pp : Format.formatter -> t -> unit
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val comparator :
(t, comparator_witness) Core_kernel.Comparator.comparator
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness) Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked : (Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter : 'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi : 'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a | `Right of 'a | `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness) Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list -> init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked : (Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi : 'a list t -> key:Key.t -> data:'a -> 'a list t
val change : 'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter : 'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi : 'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t -> init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t -> init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter : 'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct : ('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t * [ `Left of 'a | `Right of 'a | `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
val bin_size_t : ('a, 'a t) Bin_prot.Size.sizer1
val bin_write_t : ('a, 'a t) Bin_prot.Write.writer1
val bin_read_t : ('a, 'a t) Bin_prot.Read.reader1
val __bin_read_t__ : ('a, int -> 'a t) Bin_prot.Read.reader1
val bin_writer_t : ('a, 'a t) Bin_prot.Type_class.S1.writer
val bin_reader_t : ('a, 'a t) Bin_prot.Type_class.S1.reader
val bin_t : ('a, 'a t) Bin_prot.Type_class.S1.t
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness) Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum -> f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map : t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t = (Elt.t, Elt.comparator_witness) Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t -> init:'accum -> f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map : t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> Elt.t -> [ `Continue of 'b | `Stop of 'b ]) -> 'b
val fold_right : t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by : t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array : Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t -> f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
val bin_size_t : t Bin_prot.Size.sizer
val bin_write_t : t Bin_prot.Write.writer
val bin_read_t : t Bin_prot.Read.reader
val __bin_read_t__ : (int -> t) Bin_prot.Read.reader
val bin_writer_t : t Bin_prot.Type_class.writer
val bin_reader_t : t Bin_prot.Type_class.reader
val bin_t : t Bin_prot.Type_class.t
end
val hash : t -> int
val hashable : t Core_kernel.Std.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Std.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable : key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list -> ('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list, ('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list | `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) -> 'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) -> 'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key : ('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c -> f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ -> f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ -> f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ -> f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one : ('a, 'b list) t_ -> 'a key_ -> unit
val replace : ('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set : ('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ -> key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> unit Core_kernel.Or_error.t
val add_exn : ('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ -> 'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ -> key:'a key_ -> data:'b -> unit
val remove_multi : ('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c, ('a, 'b) t_ -> f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter : ('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ -> 'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) -> if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove : ('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals : ('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace : ('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ -> ('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ -> ('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr : ?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
val bin_size_t : ('a, 'a t) Bin_prot.Size.sizer1
val bin_write_t : ('a, 'a t) Bin_prot.Write.writer1
val bin_read_t : ('a, 'a t) Bin_prot.Read.reader1
val __bin_read_t__ : ('a, int -> 'a t) Bin_prot.Read.reader1
val bin_writer_t : ('a, 'a t) Bin_prot.Type_class.S1.writer
val bin_reader_t : ('a, 'a t) Bin_prot.Type_class.S1.reader
val bin_t : ('a, 'a t) Bin_prot.Type_class.S1.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val bin_size_t : t Bin_prot.Size.sizer
val bin_write_t : t Bin_prot.Write.writer
val bin_read_t : t Bin_prot.Read.reader
val __bin_read_t__ : (int -> t) Bin_prot.Read.reader
val bin_writer_t : t Bin_prot.Type_class.writer
val bin_reader_t : t Bin_prot.Type_class.reader
val bin_t : t Bin_prot.Type_class.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t -> init:'accum -> f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map : 'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt : 'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt : 'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t -> Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove : 'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace : 'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri : 'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t -> init:'b -> f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
end
module type Aux =
sig
type node
module Tree :
sig
type t = node tree
val to_string : t -> string
val str : unit -> t -> string
val pps : unit -> t -> string
val ppo : out_channel -> t -> unit
val pp_seq :
Format.formatter -> t Core_kernel.Std.Sequence.t -> unit
val pp : Format.formatter -> t -> unit
end
module Frontier :
sig
type t = node frontier
val to_string : t -> string
val str : unit -> t -> string
val pps : unit -> t -> string
val ppo : out_channel -> t -> unit
val pp_seq :
Format.formatter -> t Core_kernel.Std.Sequence.t -> unit
val pp : Format.formatter -> t -> unit
end
module Path :
sig
type t = node path
val to_string : t -> string
val str : unit -> t -> string
val pps : unit -> t -> string
val ppo : out_channel -> t -> unit
val pp_seq :
Format.formatter -> t Core_kernel.Std.Sequence.t -> unit
val pp : Format.formatter -> t -> unit
end
module Partition :
sig
type t = node partition
val to_string : t -> string
val str : unit -> t -> string
val pps : unit -> t -> string
val ppo : out_channel -> t -> unit
val pp_seq :
Format.formatter -> t Core_kernel.Std.Sequence.t -> unit
val pp : Format.formatter -> t -> unit
end
module Group :
sig
type t = node group
val to_string : t -> string
val str : unit -> t -> string
val pps : unit -> t -> string
val ppo : out_channel -> t -> unit
val pp_seq :
Format.formatter -> t Core_kernel.Std.Sequence.t -> unit
val pp : Format.formatter -> t -> unit
end
end
module type Predicate =
sig
type edge
type node
val edge : Bap.Std.Predicate.edge -> bool
val node : Bap.Std.Predicate.node -> bool
end
module type Isomorphism =
sig
type s
type t
val forward : Bap.Std.Isomorphism.s -> Bap.Std.Isomorphism.t
val backward : Bap.Std.Isomorphism.t -> Bap.Std.Isomorphism.s
end
class type ['n, 'e, 's] dfs_visitor =
object
method enter_edge : Bap.Std.edge_kind -> 'e -> 's -> 's
method enter_node : int -> 'n -> 's -> 's
method leave_edge : Bap.Std.edge_kind -> 'e -> 's -> 's
method leave_node : int -> 'n -> 's -> 's
method start_tree : 'n -> 's -> 's
end
type node_attr = Graph.Graphviz.DotAttributes.vertex
type edge_attr = Graph.Graphviz.DotAttributes.edge
type graph_attr = Graph.Graphviz.DotAttributes.graph
type ('n, 'a) labeled = { node : 'n; node_label : 'a; }
module Graphlib :
sig
module type Graph = Graph
val create :
(module Bap.Std.Graphlib.Graph with type t = 'c and type Edge.label = 'b and type Node.label = 'a) ->
?nodes:'a list -> ?edges:('a * 'a * 'b) list -> unit -> 'c
val to_dot :
(module Bap.Std.Graphlib.Graph with type edge = 'e and type node = 'n and type t = 'c) ->
?graph_attrs:('c -> Bap.Std.graph_attr list) ->
?node_attrs:('n -> Bap.Std.node_attr list) ->
?edge_attrs:('e -> Bap.Std.edge_attr list) ->
?string_of_node:('n -> string) ->
?string_of_edge:('e -> string) ->
?channel:Pervasives.out_channel ->
?formatter:Format.formatter -> ?filename:string -> 'c -> unit
val depth_first_search :
(module Bap.Std.Graphlib.Graph with type edge = 'e and type node = 'n and type t = 'c) ->
?rev:bool ->
?start:'n ->
?start_tree:('n -> 's -> 's) ->
?enter_node:(int -> 'n -> 's -> 's) ->
?leave_node:(int -> 'n -> 's -> 's) ->
?enter_edge:(Bap.Std.edge_kind -> 'e -> 's -> 's) ->
?leave_edge:(Bap.Std.edge_kind -> 'e -> 's -> 's) ->
'c -> init:'s -> 's
val depth_first_visit :
(module Bap.Std.Graphlib.Graph with type edge = 'e and type node = 'n and type t = 'c) ->
?rev:bool ->
?start:'n ->
'c -> init:'s -> ('n, 'e, 's) Bap.Std.dfs_visitor -> 's
class ['n, 'e, 's] dfs_identity_visitor : ['n, 'e, 's] dfs_visitor
val reverse_postorder_traverse :
(module Bap.Std.Graphlib.Graph with type edge = 'e and type node = 'n and type t = 'c) ->
?rev:bool -> ?start:'n -> 'c -> 'n Bap.Std.seq
val postorder_traverse :
(module Bap.Std.Graphlib.Graph with type edge = 'e and type node = 'n and type t = 'c) ->
?rev:bool -> ?start:'n -> 'c -> 'n Bap.Std.seq
val dominators :
(module Bap.Std.Graphlib.Graph with type edge = 'e and type node = 'n and type t = 'c) ->
?rev:bool -> 'c -> 'n -> 'n Bap.Std.tree
val dom_frontier :
(module Bap.Std.Graphlib.Graph with type edge = 'e and type node = 'n and type t = 'c) ->
?rev:bool -> 'c -> 'n Bap.Std.tree -> 'n Bap.Std.frontier
val strong_components :
(module Bap.Std.Graphlib.Graph with type edge = 'e and type node = 'n and type t = 'c) ->
'c -> 'n Bap.Std.partition
val shortest_path :
(module Bap.Std.Graphlib.Graph with type edge = 'e and type node = 'n and type t = 'c) ->
?weight:('e -> int) ->
?rev:bool -> 'c -> 'n -> 'n -> 'e Bap.Std.path option
val is_reachable :
(module Bap.Std.Graphlib.Graph with type edge = 'e and type node = 'n and type t = 'c) ->
?rev:bool -> 'c -> 'n -> 'n -> bool
val fold_reachable :
(module Bap.Std.Graphlib.Graph with type edge = 'e and type node = 'n and type t = 'c) ->
?rev:bool -> init:'a -> f:('a -> 'n -> 'a) -> 'c -> 'n -> 'a
val compare :
(module Bap.Std.Graphlib.Graph with type node = 'n and type t = 'a) ->
(module Bap.Std.Graphlib.Graph with type node = 'n and type t = 'b) ->
'a -> 'b -> int
val filtered :
(module Bap.Std.Graphlib.Graph with type edge = 'e and type node = 'n and type t = 'c) ->
?skip_node:('n -> bool) ->
?skip_edge:('e -> bool) ->
unit ->
(module Bap.Std.Graphlib.Graph with type edge = 'e and type node = 'n and type t = 'c)
val view :
(module Bap.Std.Graphlib.Graph with type edge = 'e and type node = 'n and type t = 'c and type Edge.label = 'b and type Node.label = 'a) ->
node:('n -> 'f) * ('f -> 'n) ->
edge:('e -> 'd) * ('d -> 'e) ->
node_label:('a -> 'p) * ('p -> 'a) ->
edge_label:('b -> 'r) * ('r -> 'b) ->
(module Bap.Std.Graphlib.Graph with type edge = 'd and type node = 'f and type t = 'c and type Edge.label = 'r and type Node.label = 'p)
module To_ocamlgraph :
functor (G : Graph) ->
sig
type t = G.t
module V :
sig
type t = G.node
val compare : t -> t -> int
val hash : t -> int
val equal : t -> t -> bool
type label = G.Node.label
val create : label -> t
val label : t -> label
end
type vertex = V.t
module E :
sig
type t = G.edge
val compare : t -> t -> int
type vertex = vertex
val src : t -> vertex
val dst : t -> vertex
type label = G.Edge.label
val create : vertex -> label -> vertex -> t
val label : t -> label
end
type edge = E.t
val is_directed : bool
val is_empty : t -> bool
val nb_vertex : t -> int
val nb_edges : t -> int
val out_degree : t -> vertex -> int
val in_degree : t -> vertex -> int
val mem_vertex : t -> vertex -> bool
val mem_edge : t -> vertex -> vertex -> bool
val mem_edge_e : t -> edge -> bool
val find_edge : t -> vertex -> vertex -> edge
val find_all_edges : t -> vertex -> vertex -> edge list
val succ : t -> vertex -> vertex list
val pred : t -> vertex -> vertex list
val succ_e : t -> vertex -> edge list
val pred_e : t -> vertex -> edge list
val iter_vertex : (vertex -> unit) -> t -> unit
val fold_vertex : (vertex -> 'a -> 'a) -> t -> 'a -> 'a
val iter_edges : (vertex -> vertex -> unit) -> t -> unit
val fold_edges :
(vertex -> vertex -> 'a -> 'a) -> t -> 'a -> 'a
val iter_edges_e : (edge -> unit) -> t -> unit
val fold_edges_e : (edge -> 'a -> 'a) -> t -> 'a -> 'a
val map_vertex : (vertex -> vertex) -> t -> t
val iter_succ : (vertex -> unit) -> t -> vertex -> unit
val iter_pred : (vertex -> unit) -> t -> vertex -> unit
val fold_succ :
(vertex -> 'a -> 'a) -> t -> vertex -> 'a -> 'a
val fold_pred :
(vertex -> 'a -> 'a) -> t -> vertex -> 'a -> 'a
val iter_succ_e : (edge -> unit) -> t -> vertex -> unit
val fold_succ_e :
(edge -> 'a -> 'a) -> t -> vertex -> 'a -> 'a
val iter_pred_e : (edge -> unit) -> t -> vertex -> unit
val fold_pred_e :
(edge -> 'a -> 'a) -> t -> vertex -> 'a -> 'a
val empty : t
val add_vertex : t -> vertex -> t
val remove_vertex : t -> vertex -> t
val add_edge : t -> vertex -> vertex -> t
val add_edge_e : t -> edge -> t
val remove_edge : t -> vertex -> vertex -> t
val remove_edge_e : t -> edge -> t
end
module Of_ocamlgraph :
functor (G : Graph.Sig.P) ->
sig
type t = G.t
type node = G.V.t
type edge = G.E.t
module Node :
sig
type t = node
type graph = t
type label = G.V.label
type edge = edge
val create : label -> t
val label : t -> label
val mem : t -> graph -> bool
val succs : t -> graph -> t seq
val preds : t -> graph -> t seq
val inputs : t -> graph -> edge seq
val outputs : t -> graph -> edge seq
val degree : ?dir:[ `In | `Out ] -> t -> graph -> int
val insert : t -> graph -> graph
val update : t -> label -> graph -> graph
val remove : t -> graph -> graph
val has_edge : t -> t -> graph -> bool
val edge : t -> t -> graph -> edge option
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list ->
'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi :
(Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array ->
'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t ->
Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t ->
f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t ->
f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key :
'a t -> Key.t -> (Key.t * 'a) option
val next_key :
'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) ->
Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) ->
'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a | `Right of 'a | `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare :
('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf :
t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable : t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) -> 'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) -> 'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one : ('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ ->
data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ -> key:'a key_ -> data:'b -> unit
val remove_multi :
('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ -> f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ ->
'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals : ('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr : ?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum -> f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map :
'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t ->
Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove : 'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b ->
f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
end
module Edge :
sig
type t = edge
type node = node
type graph = t
type label = G.E.label
val create : node -> node -> label -> t
val label : t -> label
val src : t -> node
val dst : t -> node
val mem : t -> graph -> bool
val insert : t -> graph -> graph
val update : t -> label -> graph -> graph
val remove : t -> graph -> graph
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list ->
'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi :
(Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array ->
'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t ->
Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t ->
f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t ->
f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key :
'a t -> Key.t -> (Key.t * 'a) option
val next_key :
'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) ->
Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) ->
'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a | `Right of 'a | `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare :
('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf :
t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable : t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) -> 'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) -> 'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one : ('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ ->
data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ -> key:'a key_ -> data:'b -> unit
val remove_multi :
('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ -> f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ ->
'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals : ('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr : ?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum -> f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map :
'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t ->
Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove : 'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b ->
f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
end
val empty : t
val nodes : t -> node seq
val edges : t -> edge seq
val is_directed : bool
val number_of_edges : t -> int
val number_of_nodes : t -> int
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness) Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a | `Right of 'a | `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi : 'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a | `Right of 'a | `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum -> f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map : t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t -> f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable : t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list | `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) -> 'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) -> 'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c -> f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one : ('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set : ('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ -> key:'a key_ -> data:'b -> unit
val remove_multi : ('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c, ('a, 'b) t_ -> f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter : ('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ -> 'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove : ('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals : ('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr : ?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum -> f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map : 'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt : 'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt : 'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t -> Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove : 'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b -> f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
val to_string : t -> string
val str : unit -> t -> string
val pps : unit -> t -> string
val ppo : out_channel -> t -> unit
val pp_seq :
Format.formatter -> t Core_kernel.Std.Sequence.t -> unit
val pp : Format.formatter -> t -> unit
end
module Filtered :
functor
(G : Graph) (P : sig
type edge = G.edge
type node = G.node
val edge : edge -> bool
val node : node -> bool
end) ->
sig
type t = G.t
type node = G.node
type edge = G.edge
module Node :
sig
type t = G.node
type graph = G.t
type label = G.Node.label
type edge = G.edge
val create : label -> t
val label : t -> label
val mem : t -> graph -> bool
val succs : t -> graph -> t seq
val preds : t -> graph -> t seq
val inputs : t -> graph -> edge seq
val outputs : t -> graph -> edge seq
val degree : ?dir:[ `In | `Out ] -> t -> graph -> int
val insert : t -> graph -> graph
val update : t -> label -> graph -> graph
val remove : t -> graph -> graph
val has_edge : t -> t -> graph -> bool
val edge : t -> t -> graph -> edge option
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness = G.Node.comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list ->
'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi :
(Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array ->
'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t ->
Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t ->
f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t ->
f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key :
'a t -> Key.t -> (Key.t * 'a) option
val next_key :
'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) ->
Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) ->
'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a | `Right of 'a | `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare :
('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf :
t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable : t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) -> 'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) -> 'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one : ('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ ->
data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ -> key:'a key_ -> data:'b -> unit
val remove_multi :
('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ -> f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ ->
'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals : ('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr : ?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t = 'a G.Node.Hash_queue.t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum -> f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map :
'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t ->
Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove : 'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b ->
f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
end
module Edge :
sig
type t = G.edge
type node = G.node
type graph = G.t
type label = G.Edge.label
val create : node -> node -> label -> t
val label : t -> label
val src : t -> node
val dst : t -> node
val mem : t -> graph -> bool
val insert : t -> graph -> graph
val update : t -> label -> graph -> graph
val remove : t -> graph -> graph
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness = G.Edge.comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list ->
'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi :
(Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array ->
'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t ->
Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t ->
f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t ->
f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key :
'a t -> Key.t -> (Key.t * 'a) option
val next_key :
'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) ->
Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) ->
'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a | `Right of 'a | `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare :
('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf :
t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable : t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) -> 'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) -> 'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one : ('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ ->
data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ -> key:'a key_ -> data:'b -> unit
val remove_multi :
('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ -> f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ ->
'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals : ('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr : ?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t = 'a G.Edge.Hash_queue.t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum -> f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map :
'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t ->
Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove : 'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b ->
f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
end
val empty : t
val nodes : t -> node seq
val edges : t -> edge seq
val is_directed : bool
val number_of_edges : t -> int
val number_of_nodes : t -> int
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness) Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a | `Right of 'a | `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi : 'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a | `Right of 'a | `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum -> f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map : t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t -> f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable : t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list | `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) -> 'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) -> 'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c -> f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one : ('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set : ('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ -> key:'a key_ -> data:'b -> unit
val remove_multi : ('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c, ('a, 'b) t_ -> f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter : ('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ -> 'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove : ('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals : ('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr : ?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum -> f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map : 'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt : 'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt : 'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t -> Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove : 'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b -> f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
val to_string : t -> string
val str : unit -> t -> string
val pps : unit -> t -> string
val ppo : out_channel -> t -> unit
val pp_seq :
Format.formatter -> t Core_kernel.Std.Sequence.t -> unit
val pp : Format.formatter -> t -> unit
end
module Mapper :
functor
(G : Graph) (N : sig
type s = G.node
type t
val forward : s -> t
val backward : t -> s
end) (E : sig
type s = G.edge
type t
val forward : s -> t
val backward : t -> s
end) (NL : sig
type s = G.Node.label
type t
val forward : s -> t
val backward : t -> s
end) (EL : sig
type s =
G.Edge.label
type t
val forward :
s -> t
val backward :
t -> s
end) ->
sig
type t = G.t
type node = N.t
type edge = E.t
module Node :
sig
type t = node
type graph = t
type label = NL.t
type edge = edge
val create : label -> t
val label : t -> label
val mem : t -> graph -> bool
val succs : t -> graph -> t seq
val preds : t -> graph -> t seq
val inputs : t -> graph -> edge seq
val outputs : t -> graph -> edge seq
val degree : ?dir:[ `In | `Out ] -> t -> graph -> int
val insert : t -> graph -> graph
val update : t -> label -> graph -> graph
val remove : t -> graph -> graph
val has_edge : t -> t -> graph -> bool
val edge : t -> t -> graph -> edge option
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list ->
'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi :
(Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array ->
'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t ->
Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t ->
f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t ->
f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key :
'a t -> Key.t -> (Key.t * 'a) option
val next_key :
'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) ->
Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) ->
'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a | `Right of 'a | `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare :
('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf :
t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable : t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) -> 'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) -> 'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one : ('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ ->
data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ -> key:'a key_ -> data:'b -> unit
val remove_multi :
('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ -> f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ ->
'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals : ('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr : ?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum -> f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map :
'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t ->
Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove : 'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b ->
f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
end
module Edge :
sig
type t = edge
type node = node
type graph = t
type label = EL.t
val create : node -> node -> label -> t
val label : t -> label
val src : t -> node
val dst : t -> node
val mem : t -> graph -> bool
val insert : t -> graph -> graph
val update : t -> label -> graph -> graph
val remove : t -> graph -> graph
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list ->
'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi :
(Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array ->
'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t ->
Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t ->
f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t ->
f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key :
'a t -> Key.t -> (Key.t * 'a) option
val next_key :
'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) ->
Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) ->
'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a | `Right of 'a | `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare :
('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf :
t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable : t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) -> 'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) -> 'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one : ('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ ->
data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ -> key:'a key_ -> data:'b -> unit
val remove_multi :
('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ -> f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ ->
'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals : ('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr : ?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum -> f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map :
'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t ->
Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove : 'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b ->
f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
end
val empty : t
val nodes : t -> node seq
val edges : t -> edge seq
val is_directed : bool
val number_of_edges : t -> int
val number_of_nodes : t -> int
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness) Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a | `Right of 'a | `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi : 'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a | `Right of 'a | `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum -> f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map : t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t -> f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable : t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list | `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) -> 'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) -> 'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c -> f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one : ('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set : ('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ -> key:'a key_ -> data:'b -> unit
val remove_multi : ('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c, ('a, 'b) t_ -> f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter : ('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ -> 'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove : ('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals : ('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr : ?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum -> f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map : 'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt : 'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt : 'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t -> Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove : 'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b -> f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
val to_string : t -> string
val str : unit -> t -> string
val pps : unit -> t -> string
val ppo : out_channel -> t -> unit
val pp_seq :
Format.formatter -> t Core_kernel.Std.Sequence.t -> unit
val pp : Format.formatter -> t -> unit
end
module Make :
functor (Node : Opaque) (Edge : Opaque) ->
sig
type t
type node = Node.t
type edge
module Node :
sig
type t = node
type graph = t
type label = Node.t
type edge = edge
val create : label -> t
val label : t -> label
val mem : t -> graph -> bool
val succs : t -> graph -> t seq
val preds : t -> graph -> t seq
val inputs : t -> graph -> edge seq
val outputs : t -> graph -> edge seq
val degree : ?dir:[ `In | `Out ] -> t -> graph -> int
val insert : t -> graph -> graph
val update : t -> label -> graph -> graph
val remove : t -> graph -> graph
val has_edge : t -> t -> graph -> bool
val edge : t -> t -> graph -> edge option
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list ->
'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi :
(Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array ->
'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t ->
Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t ->
f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t ->
f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key :
'a t -> Key.t -> (Key.t * 'a) option
val next_key :
'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) ->
Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) ->
'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a | `Right of 'a | `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare :
('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf :
t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable : t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) -> 'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) -> 'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one : ('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ ->
data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ -> key:'a key_ -> data:'b -> unit
val remove_multi :
('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ -> f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ ->
'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals : ('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr : ?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum -> f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map :
'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t ->
Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove : 'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b ->
f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
end
module Edge :
sig
type t = edge
type node = node
type graph = t
type label = Edge.t
val create : node -> node -> label -> t
val label : t -> label
val src : t -> node
val dst : t -> node
val mem : t -> graph -> bool
val insert : t -> graph -> graph
val update : t -> label -> graph -> graph
val remove : t -> graph -> graph
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list ->
'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi :
(Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array ->
'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t ->
Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t ->
f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t ->
f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key :
'a t -> Key.t -> (Key.t * 'a) option
val next_key :
'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) ->
Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) ->
'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a | `Right of 'a | `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare :
('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf :
t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable : t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) -> 'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) -> 'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one : ('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ ->
data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ -> key:'a key_ -> data:'b -> unit
val remove_multi :
('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ -> f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ ->
'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals : ('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr : ?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum -> f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map :
'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t ->
Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove : 'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b ->
f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
end
val empty : t
val nodes : t -> node seq
val edges : t -> edge seq
val is_directed : bool
val number_of_edges : t -> int
val number_of_nodes : t -> int
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness) Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a | `Right of 'a | `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi : 'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a | `Right of 'a | `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum -> f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map : t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t -> f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable : t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list | `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) -> 'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) -> 'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c -> f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one : ('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set : ('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ -> key:'a key_ -> data:'b -> unit
val remove_multi : ('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c, ('a, 'b) t_ -> f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter : ('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ -> 'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove : ('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals : ('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr : ?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum -> f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map : 'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt : 'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt : 'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t -> Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove : 'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b -> f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
val to_string : t -> string
val str : unit -> t -> string
val pps : unit -> t -> string
val ppo : out_channel -> t -> unit
val pp_seq :
Format.formatter -> t Core_kernel.Std.Sequence.t -> unit
val pp : Format.formatter -> t -> unit
end
module Labeled :
functor
(Node : Opaque) (NL : Core_kernel.Std.T) (EL : Core_kernel.Std.T) ->
sig
type t
type node = (Node.t, NL.t) labeled
type edge
module Node :
sig
type t = node
type graph = t
type label = (Node.t, NL.t) labeled
type edge = edge
val create : label -> t
val label : t -> label
val mem : t -> graph -> bool
val succs : t -> graph -> t seq
val preds : t -> graph -> t seq
val inputs : t -> graph -> edge seq
val outputs : t -> graph -> edge seq
val degree : ?dir:[ `In | `Out ] -> t -> graph -> int
val insert : t -> graph -> graph
val update : t -> label -> graph -> graph
val remove : t -> graph -> graph
val has_edge : t -> t -> graph -> bool
val edge : t -> t -> graph -> edge option
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list ->
'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi :
(Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array ->
'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t ->
Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t ->
f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t ->
f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key :
'a t -> Key.t -> (Key.t * 'a) option
val next_key :
'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) ->
Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) ->
'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a | `Right of 'a | `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare :
('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf :
t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable : t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) -> 'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) -> 'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one : ('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ ->
data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ -> key:'a key_ -> data:'b -> unit
val remove_multi :
('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ -> f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ ->
'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals : ('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr : ?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum -> f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map :
'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t ->
Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove : 'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b ->
f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
end
module Edge :
sig
type t = edge
type node = node
type graph = t
type label = EL.t
val create : node -> node -> label -> t
val label : t -> label
val src : t -> node
val dst : t -> node
val mem : t -> graph -> bool
val insert : t -> graph -> graph
val update : t -> label -> graph -> graph
val remove : t -> graph -> graph
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list ->
'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi :
(Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array ->
'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t ->
Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t ->
f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t ->
f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key :
'a t -> Key.t -> (Key.t * 'a) option
val next_key :
'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) ->
Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) ->
'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a | `Right of 'a | `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare :
('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf :
t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable : t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) -> 'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) -> 'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one : ('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ ->
data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ -> key:'a key_ -> data:'b -> unit
val remove_multi :
('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ -> f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ ->
'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals : ('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr : ?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum -> f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map :
'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t ->
Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove : 'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b ->
f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
end
val empty : t
val nodes : t -> node seq
val edges : t -> edge seq
val is_directed : bool
val number_of_edges : t -> int
val number_of_nodes : t -> int
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness) Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a | `Right of 'a | `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi : 'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a | `Right of 'a | `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum -> f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map : t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t -> f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable : t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list | `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) -> 'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) -> 'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c -> f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one : ('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set : ('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ -> key:'a key_ -> data:'b -> unit
val remove_multi : ('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c, ('a, 'b) t_ -> f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter : ('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ -> 'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove : ('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals : ('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr : ?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum -> f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map : 'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt : 'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt : 'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t -> Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove : 'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b -> f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
val to_string : t -> string
val str : unit -> t -> string
val pps : unit -> t -> string
val ppo : out_channel -> t -> unit
val pp_seq :
Format.formatter -> t Core_kernel.Std.Sequence.t -> unit
val pp : Format.formatter -> t -> unit
end
module type Graphs =
sig
type node
module Bool :
sig
type t
type node = node
type edge
module Node :
sig
type t = node
type graph = t
type label = node
type edge = edge
val create : label -> t
val label : t -> label
val mem : t -> graph -> bool
val succs : t -> graph -> t seq
val preds : t -> graph -> t seq
val inputs : t -> graph -> edge seq
val outputs : t -> graph -> edge seq
val degree : ?dir:[ `In | `Out ] -> t -> graph -> int
val insert : t -> graph -> graph
val update : t -> label -> graph -> graph
val remove : t -> graph -> graph
val has_edge : t -> t -> graph -> bool
val edge : t -> t -> graph -> edge option
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list ->
'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi :
(Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list ->
f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array ->
'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t ->
key:Key.t -> data:'a -> 'a list t
val change :
'a t ->
Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t ->
f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t ->
f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key :
'a t -> Key.t -> (Key.t * 'a) option
val next_key :
'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) ->
Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) ->
'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare :
('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find :
t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf :
t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
Elt.t array -> t
val stable_dedup_list :
Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable :
t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) ->
'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one :
('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ ->
data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ ->
key:'a key_ -> data:'b -> unit
val remove_multi :
('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ ->
f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ ->
'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals :
('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr :
?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum ->
f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map :
'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t ->
Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove :
'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b ->
f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
end
module Edge :
sig
type t = edge
type node = node
type graph = t
type label = bool
val create : node -> node -> label -> t
val label : t -> label
val src : t -> node
val dst : t -> node
val mem : t -> graph -> bool
val insert : t -> graph -> graph
val update : t -> label -> graph -> graph
val remove : t -> graph -> graph
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list ->
'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi :
(Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list ->
f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array ->
'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t ->
key:Key.t -> data:'a -> 'a list t
val change :
'a t ->
Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t ->
f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t ->
f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key :
'a t -> Key.t -> (Key.t * 'a) option
val next_key :
'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) ->
Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) ->
'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare :
('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find :
t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf :
t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
Elt.t array -> t
val stable_dedup_list :
Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable :
t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) ->
'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one :
('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ ->
data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ ->
key:'a key_ -> data:'b -> unit
val remove_multi :
('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ ->
f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ ->
'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals :
('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr :
?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum ->
f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map :
'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t ->
Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove :
'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b ->
f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
end
val empty : t
val nodes : t -> node seq
val edges : t -> edge seq
val is_directed : bool
val number_of_edges : t -> int
val number_of_nodes : t -> int
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness) Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a | `Right of 'a | `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map : t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable : t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) -> 'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) -> 'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one : ('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set : ('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ -> key:'a key_ -> data:'b -> unit
val remove_multi : ('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ -> f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ -> 'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals : ('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr : ?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum -> f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map : 'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t -> Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove : 'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b -> f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
val to_string : t -> string
val str : unit -> t -> string
val pps : unit -> t -> string
val ppo : out_channel -> t -> unit
val pp_seq :
Format.formatter -> t Core_kernel.Std.Sequence.t -> unit
val pp : Format.formatter -> t -> unit
end
module Unit :
sig
type t
type node = node
type edge
module Node :
sig
type t = node
type graph = t
type label = node
type edge = edge
val create : label -> t
val label : t -> label
val mem : t -> graph -> bool
val succs : t -> graph -> t seq
val preds : t -> graph -> t seq
val inputs : t -> graph -> edge seq
val outputs : t -> graph -> edge seq
val degree : ?dir:[ `In | `Out ] -> t -> graph -> int
val insert : t -> graph -> graph
val update : t -> label -> graph -> graph
val remove : t -> graph -> graph
val has_edge : t -> t -> graph -> bool
val edge : t -> t -> graph -> edge option
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list ->
'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi :
(Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list ->
f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array ->
'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t ->
key:Key.t -> data:'a -> 'a list t
val change :
'a t ->
Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t ->
f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t ->
f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key :
'a t -> Key.t -> (Key.t * 'a) option
val next_key :
'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) ->
Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) ->
'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare :
('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find :
t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf :
t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
Elt.t array -> t
val stable_dedup_list :
Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable :
t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) ->
'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one :
('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ ->
data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ ->
key:'a key_ -> data:'b -> unit
val remove_multi :
('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ ->
f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ ->
'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals :
('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr :
?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum ->
f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map :
'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t ->
Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove :
'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b ->
f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
end
module Edge :
sig
type t = edge
type node = node
type graph = t
type label = unit
val create : node -> node -> label -> t
val label : t -> label
val src : t -> node
val dst : t -> node
val mem : t -> graph -> bool
val insert : t -> graph -> graph
val update : t -> label -> graph -> graph
val remove : t -> graph -> graph
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list ->
'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi :
(Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list ->
f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array ->
'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t ->
key:Key.t -> data:'a -> 'a list t
val change :
'a t ->
Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t ->
f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t ->
f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key :
'a t -> Key.t -> (Key.t * 'a) option
val next_key :
'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) ->
Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) ->
'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare :
('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find :
t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf :
t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
Elt.t array -> t
val stable_dedup_list :
Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable :
t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) ->
'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one :
('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ ->
data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ ->
key:'a key_ -> data:'b -> unit
val remove_multi :
('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ ->
f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ ->
'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals :
('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr :
?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum ->
f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map :
'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t ->
Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove :
'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b ->
f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
end
val empty : t
val nodes : t -> node seq
val edges : t -> edge seq
val is_directed : bool
val number_of_edges : t -> int
val number_of_nodes : t -> int
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness) Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a | `Right of 'a | `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map : t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable : t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) -> 'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) -> 'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one : ('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set : ('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ -> key:'a key_ -> data:'b -> unit
val remove_multi : ('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ -> f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ -> 'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals : ('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr : ?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum -> f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map : 'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t -> Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove : 'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b -> f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
val to_string : t -> string
val str : unit -> t -> string
val pps : unit -> t -> string
val ppo : out_channel -> t -> unit
val pp_seq :
Format.formatter -> t Core_kernel.Std.Sequence.t -> unit
val pp : Format.formatter -> t -> unit
end
module Value :
sig
type t
type node = node
type edge
module Node :
sig
type t = node
type graph = t
type label = node
type edge = edge
val create : label -> t
val label : t -> label
val mem : t -> graph -> bool
val succs : t -> graph -> t seq
val preds : t -> graph -> t seq
val inputs : t -> graph -> edge seq
val outputs : t -> graph -> edge seq
val degree : ?dir:[ `In | `Out ] -> t -> graph -> int
val insert : t -> graph -> graph
val update : t -> label -> graph -> graph
val remove : t -> graph -> graph
val has_edge : t -> t -> graph -> bool
val edge : t -> t -> graph -> edge option
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list ->
'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi :
(Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list ->
f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array ->
'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t ->
key:Key.t -> data:'a -> 'a list t
val change :
'a t ->
Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t ->
f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t ->
f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key :
'a t -> Key.t -> (Key.t * 'a) option
val next_key :
'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) ->
Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) ->
'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare :
('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find :
t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf :
t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
Elt.t array -> t
val stable_dedup_list :
Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable :
t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) ->
'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one :
('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ ->
data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ ->
key:'a key_ -> data:'b -> unit
val remove_multi :
('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ ->
f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ ->
'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals :
('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr :
?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum ->
f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map :
'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t ->
Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove :
'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b ->
f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
end
module Edge :
sig
type t = edge
type node = node
type graph = t
type label = value
val create : node -> node -> label -> t
val label : t -> label
val src : t -> node
val dst : t -> node
val mem : t -> graph -> bool
val insert : t -> graph -> graph
val update : t -> label -> graph -> graph
val remove : t -> graph -> graph
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list ->
'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi :
(Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list ->
f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array ->
'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t ->
key:Key.t -> data:'a -> 'a list t
val change :
'a t ->
Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t ->
f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t ->
f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key :
'a t -> Key.t -> (Key.t * 'a) option
val next_key :
'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) ->
Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) ->
'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare :
('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find :
t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf :
t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
Elt.t array -> t
val stable_dedup_list :
Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable :
t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) ->
'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one :
('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ ->
data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ ->
key:'a key_ -> data:'b -> unit
val remove_multi :
('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ ->
f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ ->
'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals :
('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr :
?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum ->
f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map :
'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t ->
Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove :
'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b ->
f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
end
val empty : t
val nodes : t -> node seq
val edges : t -> edge seq
val is_directed : bool
val number_of_edges : t -> int
val number_of_nodes : t -> int
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness) Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a | `Right of 'a | `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map : t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable : t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) -> 'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) -> 'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one : ('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set : ('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ -> key:'a key_ -> data:'b -> unit
val remove_multi : ('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ -> f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ -> 'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals : ('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr : ?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum -> f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map : 'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t -> Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove : 'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b -> f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
val to_string : t -> string
val str : unit -> t -> string
val pps : unit -> t -> string
val ppo : out_channel -> t -> unit
val pp_seq :
Format.formatter -> t Core_kernel.Std.Sequence.t -> unit
val pp : Format.formatter -> t -> unit
end
module Word :
sig
type t
type node = node
type edge
module Node :
sig
type t = node
type graph = t
type label = node
type edge = edge
val create : label -> t
val label : t -> label
val mem : t -> graph -> bool
val succs : t -> graph -> t seq
val preds : t -> graph -> t seq
val inputs : t -> graph -> edge seq
val outputs : t -> graph -> edge seq
val degree : ?dir:[ `In | `Out ] -> t -> graph -> int
val insert : t -> graph -> graph
val update : t -> label -> graph -> graph
val remove : t -> graph -> graph
val has_edge : t -> t -> graph -> bool
val edge : t -> t -> graph -> edge option
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list ->
'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi :
(Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list ->
f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array ->
'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t ->
key:Key.t -> data:'a -> 'a list t
val change :
'a t ->
Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t ->
f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t ->
f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key :
'a t -> Key.t -> (Key.t * 'a) option
val next_key :
'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) ->
Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) ->
'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare :
('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find :
t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf :
t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
Elt.t array -> t
val stable_dedup_list :
Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable :
t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) ->
'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one :
('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ ->
data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ ->
key:'a key_ -> data:'b -> unit
val remove_multi :
('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ ->
f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ ->
'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals :
('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr :
?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum ->
f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map :
'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t ->
Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove :
'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b ->
f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
end
module Edge :
sig
type t = edge
type node = node
type graph = t
type label = word
val create : node -> node -> label -> t
val label : t -> label
val src : t -> node
val dst : t -> node
val mem : t -> graph -> bool
val insert : t -> graph -> graph
val update : t -> label -> graph -> graph
val remove : t -> graph -> graph
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list ->
'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi :
(Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list ->
f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array ->
'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t ->
key:Key.t -> data:'a -> 'a list t
val change :
'a t ->
Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t ->
f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t ->
f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key :
'a t -> Key.t -> (Key.t * 'a) option
val next_key :
'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) ->
Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) ->
'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare :
('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find :
t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf :
t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
Elt.t array -> t
val stable_dedup_list :
Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable :
t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) ->
'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one :
('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ ->
data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ ->
key:'a key_ -> data:'b -> unit
val remove_multi :
('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ ->
f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ ->
'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals :
('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr :
?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum ->
f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map :
'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t ->
Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove :
'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b ->
f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
end
val empty : t
val nodes : t -> node seq
val edges : t -> edge seq
val is_directed : bool
val number_of_edges : t -> int
val number_of_nodes : t -> int
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness) Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a | `Right of 'a | `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map : t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable : t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) -> 'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) -> 'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one : ('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set : ('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ -> key:'a key_ -> data:'b -> unit
val remove_multi : ('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ -> f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ -> 'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals : ('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr : ?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum -> f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map : 'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t -> Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove : 'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b -> f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
val to_string : t -> string
val str : unit -> t -> string
val pps : unit -> t -> string
val ppo : out_channel -> t -> unit
val pp_seq :
Format.formatter -> t Core_kernel.Std.Sequence.t -> unit
val pp : Format.formatter -> t -> unit
end
module Int :
sig
type t
type node = node
type edge
module Node :
sig
type t = node
type graph = t
type label = node
type edge = edge
val create : label -> t
val label : t -> label
val mem : t -> graph -> bool
val succs : t -> graph -> t seq
val preds : t -> graph -> t seq
val inputs : t -> graph -> edge seq
val outputs : t -> graph -> edge seq
val degree : ?dir:[ `In | `Out ] -> t -> graph -> int
val insert : t -> graph -> graph
val update : t -> label -> graph -> graph
val remove : t -> graph -> graph
val has_edge : t -> t -> graph -> bool
val edge : t -> t -> graph -> edge option
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list ->
'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi :
(Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list ->
f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array ->
'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t ->
key:Key.t -> data:'a -> 'a list t
val change :
'a t ->
Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t ->
f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t ->
f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key :
'a t -> Key.t -> (Key.t * 'a) option
val next_key :
'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) ->
Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) ->
'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare :
('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find :
t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf :
t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
Elt.t array -> t
val stable_dedup_list :
Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable :
t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) ->
'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one :
('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ ->
data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ ->
key:'a key_ -> data:'b -> unit
val remove_multi :
('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ ->
f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ ->
'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals :
('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr :
?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum ->
f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map :
'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t ->
Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove :
'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b ->
f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
end
module Edge :
sig
type t = edge
type node = node
type graph = t
type label = int
val create : node -> node -> label -> t
val label : t -> label
val src : t -> node
val dst : t -> node
val mem : t -> graph -> bool
val insert : t -> graph -> graph
val update : t -> label -> graph -> graph
val remove : t -> graph -> graph
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list ->
'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi :
(Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list ->
f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array ->
'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t ->
key:Key.t -> data:'a -> 'a list t
val change :
'a t ->
Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t ->
f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t ->
f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key :
'a t -> Key.t -> (Key.t * 'a) option
val next_key :
'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) ->
Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) ->
'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare :
('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find :
t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf :
t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
Elt.t array -> t
val stable_dedup_list :
Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable :
t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) ->
'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one :
('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ ->
data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ ->
key:'a key_ -> data:'b -> unit
val remove_multi :
('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ ->
f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ ->
'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals :
('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr :
?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum ->
f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map :
'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t ->
Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove :
'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b ->
f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
end
val empty : t
val nodes : t -> node seq
val edges : t -> edge seq
val is_directed : bool
val number_of_edges : t -> int
val number_of_nodes : t -> int
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness) Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a | `Right of 'a | `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map : t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable : t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) -> 'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) -> 'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one : ('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set : ('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ -> key:'a key_ -> data:'b -> unit
val remove_multi : ('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ -> f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ -> 'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals : ('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr : ?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum -> f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map : 'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t -> Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove : 'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b -> f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
val to_string : t -> string
val str : unit -> t -> string
val pps : unit -> t -> string
val ppo : out_channel -> t -> unit
val pp_seq :
Format.formatter -> t Core_kernel.Std.Sequence.t -> unit
val pp : Format.formatter -> t -> unit
end
module String :
sig
type t
type node = node
type edge
module Node :
sig
type t = node
type graph = t
type label = node
type edge = edge
val create : label -> t
val label : t -> label
val mem : t -> graph -> bool
val succs : t -> graph -> t seq
val preds : t -> graph -> t seq
val inputs : t -> graph -> edge seq
val outputs : t -> graph -> edge seq
val degree : ?dir:[ `In | `Out ] -> t -> graph -> int
val insert : t -> graph -> graph
val update : t -> label -> graph -> graph
val remove : t -> graph -> graph
val has_edge : t -> t -> graph -> bool
val edge : t -> t -> graph -> edge option
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list ->
'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi :
(Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list ->
f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array ->
'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t ->
key:Key.t -> data:'a -> 'a list t
val change :
'a t ->
Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t ->
f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t ->
f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key :
'a t -> Key.t -> (Key.t * 'a) option
val next_key :
'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) ->
Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) ->
'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare :
('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find :
t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf :
t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
Elt.t array -> t
val stable_dedup_list :
Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable :
t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) ->
'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one :
('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ ->
data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ ->
key:'a key_ -> data:'b -> unit
val remove_multi :
('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ ->
f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ ->
'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals :
('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr :
?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum ->
f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map :
'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t ->
Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove :
'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b ->
f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
end
module Edge :
sig
type t = edge
type node = node
type graph = t
type label = string
val create : node -> node -> label -> t
val label : t -> label
val src : t -> node
val dst : t -> node
val mem : t -> graph -> bool
val insert : t -> graph -> graph
val update : t -> label -> graph -> graph
val remove : t -> graph -> graph
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list ->
'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi :
(Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list ->
f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array ->
'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t ->
key:Key.t -> data:'a -> 'a list t
val change :
'a t ->
Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t ->
f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t ->
f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key :
'a t -> Key.t -> (Key.t * 'a) option
val next_key :
'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) ->
Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) ->
'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare :
('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find :
t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf :
t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
Elt.t array -> t
val stable_dedup_list :
Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable :
t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) ->
'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one :
('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ ->
data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ ->
key:'a key_ -> data:'b -> unit
val remove_multi :
('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ ->
f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ ->
'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals :
('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr :
?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum ->
f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map :
'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t ->
Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove :
'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b ->
f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
end
val empty : t
val nodes : t -> node seq
val edges : t -> edge seq
val is_directed : bool
val number_of_edges : t -> int
val number_of_nodes : t -> int
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness) Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a | `Right of 'a | `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map : t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable : t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) -> 'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) -> 'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one : ('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set : ('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ -> key:'a key_ -> data:'b -> unit
val remove_multi : ('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ -> f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ -> 'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals : ('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr : ?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum -> f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map : 'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t -> Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove : 'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b -> f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
val to_string : t -> string
val str : unit -> t -> string
val pps : unit -> t -> string
val ppo : out_channel -> t -> unit
val pp_seq :
Format.formatter -> t Core_kernel.Std.Sequence.t -> unit
val pp : Format.formatter -> t -> unit
end
module Exp :
sig
type t
type node = node
type edge
module Node :
sig
type t = node
type graph = t
type label = node
type edge = edge
val create : label -> t
val label : t -> label
val mem : t -> graph -> bool
val succs : t -> graph -> t seq
val preds : t -> graph -> t seq
val inputs : t -> graph -> edge seq
val outputs : t -> graph -> edge seq
val degree : ?dir:[ `In | `Out ] -> t -> graph -> int
val insert : t -> graph -> graph
val update : t -> label -> graph -> graph
val remove : t -> graph -> graph
val has_edge : t -> t -> graph -> bool
val edge : t -> t -> graph -> edge option
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list ->
'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi :
(Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list ->
f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array ->
'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t ->
key:Key.t -> data:'a -> 'a list t
val change :
'a t ->
Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t ->
f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t ->
f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key :
'a t -> Key.t -> (Key.t * 'a) option
val next_key :
'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) ->
Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) ->
'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare :
('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find :
t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf :
t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
Elt.t array -> t
val stable_dedup_list :
Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable :
t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) ->
'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one :
('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ ->
data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ ->
key:'a key_ -> data:'b -> unit
val remove_multi :
('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ ->
f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ ->
'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals :
('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr :
?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum ->
f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map :
'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t ->
Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove :
'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b ->
f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
end
module Edge :
sig
type t = edge
type node = node
type graph = t
type label = exp
val create : node -> node -> label -> t
val label : t -> label
val src : t -> node
val dst : t -> node
val mem : t -> graph -> bool
val insert : t -> graph -> graph
val update : t -> label -> graph -> graph
val remove : t -> graph -> graph
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list ->
'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi :
(Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list ->
f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array ->
'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t ->
key:Key.t -> data:'a -> 'a list t
val change :
'a t ->
Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t ->
f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t ->
f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key :
'a t -> Key.t -> (Key.t * 'a) option
val next_key :
'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) ->
Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) ->
'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare :
('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find :
t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf :
t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
Elt.t array -> t
val stable_dedup_list :
Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable :
t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) ->
'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one :
('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ ->
data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ ->
key:'a key_ -> data:'b -> unit
val remove_multi :
('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ ->
f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ ->
'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals :
('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr :
?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum ->
f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map :
'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t ->
Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove :
'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b ->
f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
end
val empty : t
val nodes : t -> node seq
val edges : t -> edge seq
val is_directed : bool
val number_of_edges : t -> int
val number_of_nodes : t -> int
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness) Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a | `Right of 'a | `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map : t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable : t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) -> 'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) -> 'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one : ('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set : ('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ -> key:'a key_ -> data:'b -> unit
val remove_multi : ('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ -> f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ -> 'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals : ('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr : ?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum -> f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map : 'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t -> Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove : 'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b -> f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
val to_string : t -> string
val str : unit -> t -> string
val pps : unit -> t -> string
val ppo : out_channel -> t -> unit
val pp_seq :
Format.formatter -> t Core_kernel.Std.Sequence.t -> unit
val pp : Format.formatter -> t -> unit
end
module Stmt :
sig
type t
type node = node
type edge
module Node :
sig
type t = node
type graph = t
type label = node
type edge = edge
val create : label -> t
val label : t -> label
val mem : t -> graph -> bool
val succs : t -> graph -> t seq
val preds : t -> graph -> t seq
val inputs : t -> graph -> edge seq
val outputs : t -> graph -> edge seq
val degree : ?dir:[ `In | `Out ] -> t -> graph -> int
val insert : t -> graph -> graph
val update : t -> label -> graph -> graph
val remove : t -> graph -> graph
val has_edge : t -> t -> graph -> bool
val edge : t -> t -> graph -> edge option
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list ->
'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi :
(Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list ->
f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array ->
'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t ->
key:Key.t -> data:'a -> 'a list t
val change :
'a t ->
Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t ->
f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t ->
f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key :
'a t -> Key.t -> (Key.t * 'a) option
val next_key :
'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) ->
Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) ->
'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare :
('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find :
t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf :
t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
Elt.t array -> t
val stable_dedup_list :
Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable :
t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) ->
'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one :
('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ ->
data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ ->
key:'a key_ -> data:'b -> unit
val remove_multi :
('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ ->
f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ ->
'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals :
('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr :
?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum ->
f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map :
'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t ->
Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove :
'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b ->
f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
end
module Edge :
sig
type t = edge
type node = node
type graph = t
type label = stmt
val create : node -> node -> label -> t
val label : t -> label
val src : t -> node
val dst : t -> node
val mem : t -> graph -> bool
val insert : t -> graph -> graph
val update : t -> label -> graph -> graph
val remove : t -> graph -> graph
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list ->
'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi :
(Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list ->
f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array ->
'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t ->
key:Key.t -> data:'a -> 'a list t
val change :
'a t ->
Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t ->
f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t ->
f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key :
'a t -> Key.t -> (Key.t * 'a) option
val next_key :
'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) ->
Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) ->
'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare :
('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find :
t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf :
t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
Elt.t array -> t
val stable_dedup_list :
Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable :
t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) ->
'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one :
('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ ->
data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ ->
key:'a key_ -> data:'b -> unit
val remove_multi :
('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ ->
f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ ->
'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals :
('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr :
?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum ->
f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map :
'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t ->
Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove :
'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b ->
f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
end
val empty : t
val nodes : t -> node seq
val edges : t -> edge seq
val is_directed : bool
val number_of_edges : t -> int
val number_of_nodes : t -> int
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness) Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a | `Right of 'a | `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map : t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable : t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) -> 'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) -> 'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one : ('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set : ('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ -> key:'a key_ -> data:'b -> unit
val remove_multi : ('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ -> f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ -> 'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals : ('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr : ?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum -> f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map : 'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t -> Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove : 'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b -> f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
val to_string : t -> string
val str : unit -> t -> string
val pps : unit -> t -> string
val ppo : out_channel -> t -> unit
val pp_seq :
Format.formatter -> t Core_kernel.Std.Sequence.t -> unit
val pp : Format.formatter -> t -> unit
end
module Var :
sig
type t
type node = node
type edge
module Node :
sig
type t = node
type graph = t
type label = node
type edge = edge
val create : label -> t
val label : t -> label
val mem : t -> graph -> bool
val succs : t -> graph -> t seq
val preds : t -> graph -> t seq
val inputs : t -> graph -> edge seq
val outputs : t -> graph -> edge seq
val degree : ?dir:[ `In | `Out ] -> t -> graph -> int
val insert : t -> graph -> graph
val update : t -> label -> graph -> graph
val remove : t -> graph -> graph
val has_edge : t -> t -> graph -> bool
val edge : t -> t -> graph -> edge option
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list ->
'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi :
(Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list ->
f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array ->
'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t ->
key:Key.t -> data:'a -> 'a list t
val change :
'a t ->
Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t ->
f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t ->
f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key :
'a t -> Key.t -> (Key.t * 'a) option
val next_key :
'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) ->
Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) ->
'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare :
('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find :
t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf :
t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
Elt.t array -> t
val stable_dedup_list :
Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable :
t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) ->
'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one :
('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ ->
data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ ->
key:'a key_ -> data:'b -> unit
val remove_multi :
('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ ->
f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ ->
'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals :
('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr :
?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum ->
f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map :
'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t ->
Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove :
'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b ->
f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
end
module Edge :
sig
type t = edge
type node = node
type graph = t
type label = var
val create : node -> node -> label -> t
val label : t -> label
val src : t -> node
val dst : t -> node
val mem : t -> graph -> bool
val insert : t -> graph -> graph
val update : t -> label -> graph -> graph
val remove : t -> graph -> graph
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list ->
'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi :
(Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list ->
f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array ->
'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t ->
key:Key.t -> data:'a -> 'a list t
val change :
'a t ->
Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t ->
f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t ->
f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key :
'a t -> Key.t -> (Key.t * 'a) option
val next_key :
'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) ->
Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) ->
'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare :
('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find :
t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf :
t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
Elt.t array -> t
val stable_dedup_list :
Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable :
t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) ->
'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one :
('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ ->
data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ ->
key:'a key_ -> data:'b -> unit
val remove_multi :
('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ ->
f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ ->
'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals :
('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr :
?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum ->
f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map :
'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t ->
Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove :
'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b ->
f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
end
val empty : t
val nodes : t -> node seq
val edges : t -> edge seq
val is_directed : bool
val number_of_edges : t -> int
val number_of_nodes : t -> int
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness) Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a | `Right of 'a | `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map : t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable : t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) -> 'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) -> 'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one : ('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set : ('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ -> key:'a key_ -> data:'b -> unit
val remove_multi : ('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ -> f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ -> 'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals : ('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr : ?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum -> f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map : 'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t -> Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove : 'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b -> f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
val to_string : t -> string
val str : unit -> t -> string
val pps : unit -> t -> string
val ppo : out_channel -> t -> unit
val pp_seq :
Format.formatter -> t Core_kernel.Std.Sequence.t -> unit
val pp : Format.formatter -> t -> unit
end
module Tid :
sig
type t
type node = node
type edge
module Node :
sig
type t = node
type graph = t
type label = node
type edge = edge
val create : label -> t
val label : t -> label
val mem : t -> graph -> bool
val succs : t -> graph -> t seq
val preds : t -> graph -> t seq
val inputs : t -> graph -> edge seq
val outputs : t -> graph -> edge seq
val degree : ?dir:[ `In | `Out ] -> t -> graph -> int
val insert : t -> graph -> graph
val update : t -> label -> graph -> graph
val remove : t -> graph -> graph
val has_edge : t -> t -> graph -> bool
val edge : t -> t -> graph -> edge option
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list ->
'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi :
(Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list ->
f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array ->
'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t ->
key:Key.t -> data:'a -> 'a list t
val change :
'a t ->
Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t ->
f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t ->
f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key :
'a t -> Key.t -> (Key.t * 'a) option
val next_key :
'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) ->
Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) ->
'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare :
('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find :
t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf :
t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
Elt.t array -> t
val stable_dedup_list :
Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable :
t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) ->
'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one :
('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ ->
data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ ->
key:'a key_ -> data:'b -> unit
val remove_multi :
('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ ->
f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ ->
'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals :
('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr :
?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum ->
f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map :
'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t ->
Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove :
'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b ->
f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
end
module Edge :
sig
type t = edge
type node = node
type graph = t
type label = tid
val create : node -> node -> label -> t
val label : t -> label
val src : t -> node
val dst : t -> node
val mem : t -> graph -> bool
val insert : t -> graph -> graph
val update : t -> label -> graph -> graph
val remove : t -> graph -> graph
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list ->
'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi :
(Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list ->
f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array ->
'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t ->
key:Key.t -> data:'a -> 'a list t
val change :
'a t ->
Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t ->
f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t ->
f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key :
'a t -> Key.t -> (Key.t * 'a) option
val next_key :
'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) ->
Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) ->
'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare :
('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find :
t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf :
t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
Elt.t array -> t
val stable_dedup_list :
Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable :
t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) ->
'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one :
('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ ->
data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ ->
key:'a key_ -> data:'b -> unit
val remove_multi :
('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ ->
f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ ->
'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals :
('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr :
?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum ->
f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map :
'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t ->
Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove :
'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b ->
f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
end
val empty : t
val nodes : t -> node seq
val edges : t -> edge seq
val is_directed : bool
val number_of_edges : t -> int
val number_of_nodes : t -> int
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness) Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a | `Right of 'a | `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map : t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable : t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) -> 'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) -> 'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one : ('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set : ('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ -> key:'a key_ -> data:'b -> unit
val remove_multi : ('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ -> f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ -> 'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals : ('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr : ?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum -> f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map : 'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t -> Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove : 'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b -> f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
val to_string : t -> string
val str : unit -> t -> string
val pps : unit -> t -> string
val ppo : out_channel -> t -> unit
val pp_seq :
Format.formatter -> t Core_kernel.Std.Sequence.t -> unit
val pp : Format.formatter -> t -> unit
end
module Type :
sig
type t
type node = node
type edge
module Node :
sig
type t = node
type graph = t
type label = node
type edge = edge
val create : label -> t
val label : t -> label
val mem : t -> graph -> bool
val succs : t -> graph -> t seq
val preds : t -> graph -> t seq
val inputs : t -> graph -> edge seq
val outputs : t -> graph -> edge seq
val degree : ?dir:[ `In | `Out ] -> t -> graph -> int
val insert : t -> graph -> graph
val update : t -> label -> graph -> graph
val remove : t -> graph -> graph
val has_edge : t -> t -> graph -> bool
val edge : t -> t -> graph -> edge option
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list ->
'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi :
(Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list ->
f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array ->
'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t ->
key:Key.t -> data:'a -> 'a list t
val change :
'a t ->
Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t ->
f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t ->
f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key :
'a t -> Key.t -> (Key.t * 'a) option
val next_key :
'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) ->
Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) ->
'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare :
('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find :
t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf :
t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
Elt.t array -> t
val stable_dedup_list :
Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable :
t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) ->
'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one :
('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ ->
data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ ->
key:'a key_ -> data:'b -> unit
val remove_multi :
('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ ->
f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ ->
'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals :
('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr :
?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum ->
f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map :
'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t ->
Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove :
'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b ->
f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
end
module Edge :
sig
type t = edge
type node = node
type graph = t
type label = typ
val create : node -> node -> label -> t
val label : t -> label
val src : t -> node
val dst : t -> node
val mem : t -> graph -> bool
val insert : t -> graph -> graph
val update : t -> label -> graph -> graph
val remove : t -> graph -> graph
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list ->
'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi :
(Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list ->
f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array ->
'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t ->
key:Key.t -> data:'a -> 'a list t
val change :
'a t ->
Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t ->
f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t ->
f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key :
'a t -> Key.t -> (Key.t * 'a) option
val next_key :
'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) ->
Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) ->
'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare :
('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find :
t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf :
t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
Elt.t array -> t
val stable_dedup_list :
Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable :
t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) ->
'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one :
('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ ->
data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ ->
key:'a key_ -> data:'b -> unit
val remove_multi :
('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ ->
f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ ->
'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals :
('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr :
?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum ->
f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map :
'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t ->
Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove :
'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b ->
f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
end
val empty : t
val nodes : t -> node seq
val edges : t -> edge seq
val is_directed : bool
val number_of_edges : t -> int
val number_of_nodes : t -> int
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness) Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a | `Right of 'a | `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map : t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable : t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) -> 'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) -> 'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one : ('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set : ('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ -> key:'a key_ -> data:'b -> unit
val remove_multi : ('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ -> f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ -> 'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals : ('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr : ?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum -> f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map : 'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t -> Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove : 'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b -> f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
val to_string : t -> string
val str : unit -> t -> string
val pps : unit -> t -> string
val ppo : out_channel -> t -> unit
val pp_seq :
Format.formatter -> t Core_kernel.Std.Sequence.t -> unit
val pp : Format.formatter -> t -> unit
end
module Tree :
sig
type t = node tree
val to_string : t -> string
val str : unit -> t -> string
val pps : unit -> t -> string
val ppo : out_channel -> t -> unit
val pp_seq :
Format.formatter -> t Core_kernel.Std.Sequence.t -> unit
val pp : Format.formatter -> t -> unit
end
module Frontier :
sig
type t = node frontier
val to_string : t -> string
val str : unit -> t -> string
val pps : unit -> t -> string
val ppo : out_channel -> t -> unit
val pp_seq :
Format.formatter -> t Core_kernel.Std.Sequence.t -> unit
val pp : Format.formatter -> t -> unit
end
module Path :
sig
type t = node path
val to_string : t -> string
val str : unit -> t -> string
val pps : unit -> t -> string
val ppo : out_channel -> t -> unit
val pp_seq :
Format.formatter -> t Core_kernel.Std.Sequence.t -> unit
val pp : Format.formatter -> t -> unit
end
module Partition :
sig
type t = node partition
val to_string : t -> string
val str : unit -> t -> string
val pps : unit -> t -> string
val ppo : out_channel -> t -> unit
val pp_seq :
Format.formatter -> t Core_kernel.Std.Sequence.t -> unit
val pp : Format.formatter -> t -> unit
end
module Group :
sig
type t = node group
val to_string : t -> string
val str : unit -> t -> string
val pps : unit -> t -> string
val ppo : out_channel -> t -> unit
val pp_seq :
Format.formatter -> t Core_kernel.Std.Sequence.t -> unit
val pp : Format.formatter -> t -> unit
end
end
module Int :
sig
type node = int
module Bool :
sig
type t
type node = node
type edge
module Node :
sig
type t = node
type graph = t
type label = node
type edge = edge
val create : label -> t
val label : t -> label
val mem : t -> graph -> bool
val succs : t -> graph -> t seq
val preds : t -> graph -> t seq
val inputs : t -> graph -> edge seq
val outputs : t -> graph -> edge seq
val degree : ?dir:[ `In | `Out ] -> t -> graph -> int
val insert : t -> graph -> graph
val update : t -> label -> graph -> graph
val remove : t -> graph -> graph
val has_edge : t -> t -> graph -> bool
val edge : t -> t -> graph -> edge option
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list ->
'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi :
(Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list ->
f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array ->
'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t ->
key:Key.t -> data:'a -> 'a list t
val change :
'a t ->
Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t ->
f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t ->
f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key :
'a t -> Key.t -> (Key.t * 'a) option
val next_key :
'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) ->
Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) ->
'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare :
('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find :
t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf :
t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
Elt.t array -> t
val stable_dedup_list :
Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable :
t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) ->
'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one :
('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ ->
data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ ->
key:'a key_ -> data:'b -> unit
val remove_multi :
('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ ->
f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ ->
'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals :
('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr :
?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum ->
f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map :
'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t ->
Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove :
'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b ->
f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
end
module Edge :
sig
type t = edge
type node = node
type graph = t
type label = bool
val create : node -> node -> label -> t
val label : t -> label
val src : t -> node
val dst : t -> node
val mem : t -> graph -> bool
val insert : t -> graph -> graph
val update : t -> label -> graph -> graph
val remove : t -> graph -> graph
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list ->
'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi :
(Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list ->
f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array ->
'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t ->
key:Key.t -> data:'a -> 'a list t
val change :
'a t ->
Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t ->
f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t ->
f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key :
'a t -> Key.t -> (Key.t * 'a) option
val next_key :
'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) ->
Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) ->
'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare :
('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find :
t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf :
t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
Elt.t array -> t
val stable_dedup_list :
Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable :
t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) ->
'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one :
('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ ->
data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ ->
key:'a key_ -> data:'b -> unit
val remove_multi :
('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ ->
f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ ->
'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals :
('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr :
?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum ->
f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map :
'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t ->
Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove :
'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b ->
f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
end
val empty : t
val nodes : t -> node seq
val edges : t -> edge seq
val is_directed : bool
val number_of_edges : t -> int
val number_of_nodes : t -> int
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness) Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a | `Right of 'a | `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map : t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable : t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) -> 'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) -> 'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one : ('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set : ('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ -> key:'a key_ -> data:'b -> unit
val remove_multi : ('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ -> f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ -> 'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals : ('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr : ?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum -> f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map : 'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t -> Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove : 'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b -> f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
val to_string : t -> string
val str : unit -> t -> string
val pps : unit -> t -> string
val ppo : out_channel -> t -> unit
val pp_seq :
Format.formatter -> t Core_kernel.Std.Sequence.t -> unit
val pp : Format.formatter -> t -> unit
end
module Unit :
sig
type t
type node = node
type edge
module Node :
sig
type t = node
type graph = t
type label = node
type edge = edge
val create : label -> t
val label : t -> label
val mem : t -> graph -> bool
val succs : t -> graph -> t seq
val preds : t -> graph -> t seq
val inputs : t -> graph -> edge seq
val outputs : t -> graph -> edge seq
val degree : ?dir:[ `In | `Out ] -> t -> graph -> int
val insert : t -> graph -> graph
val update : t -> label -> graph -> graph
val remove : t -> graph -> graph
val has_edge : t -> t -> graph -> bool
val edge : t -> t -> graph -> edge option
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list ->
'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi :
(Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list ->
f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array ->
'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t ->
key:Key.t -> data:'a -> 'a list t
val change :
'a t ->
Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t ->
f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t ->
f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key :
'a t -> Key.t -> (Key.t * 'a) option
val next_key :
'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) ->
Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) ->
'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare :
('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find :
t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf :
t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
Elt.t array -> t
val stable_dedup_list :
Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable :
t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) ->
'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one :
('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ ->
data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ ->
key:'a key_ -> data:'b -> unit
val remove_multi :
('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ ->
f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ ->
'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals :
('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr :
?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum ->
f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map :
'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t ->
Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove :
'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b ->
f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
end
module Edge :
sig
type t = edge
type node = node
type graph = t
type label = unit
val create : node -> node -> label -> t
val label : t -> label
val src : t -> node
val dst : t -> node
val mem : t -> graph -> bool
val insert : t -> graph -> graph
val update : t -> label -> graph -> graph
val remove : t -> graph -> graph
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list ->
'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi :
(Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list ->
f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array ->
'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t ->
key:Key.t -> data:'a -> 'a list t
val change :
'a t ->
Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t ->
f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t ->
f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key :
'a t -> Key.t -> (Key.t * 'a) option
val next_key :
'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) ->
Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) ->
'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare :
('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find :
t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf :
t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
Elt.t array -> t
val stable_dedup_list :
Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable :
t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) ->
'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one :
('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ ->
data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ ->
key:'a key_ -> data:'b -> unit
val remove_multi :
('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ ->
f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ ->
'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals :
('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr :
?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum ->
f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map :
'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t ->
Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove :
'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b ->
f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
end
val empty : t
val nodes : t -> node seq
val edges : t -> edge seq
val is_directed : bool
val number_of_edges : t -> int
val number_of_nodes : t -> int
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness) Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a | `Right of 'a | `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map : t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable : t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) -> 'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) -> 'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one : ('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set : ('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ -> key:'a key_ -> data:'b -> unit
val remove_multi : ('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ -> f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ -> 'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals : ('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr : ?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum -> f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map : 'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t -> Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove : 'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b -> f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
val to_string : t -> string
val str : unit -> t -> string
val pps : unit -> t -> string
val ppo : out_channel -> t -> unit
val pp_seq :
Format.formatter -> t Core_kernel.Std.Sequence.t -> unit
val pp : Format.formatter -> t -> unit
end
module Value :
sig
type t
type node = node
type edge
module Node :
sig
type t = node
type graph = t
type label = node
type edge = edge
val create : label -> t
val label : t -> label
val mem : t -> graph -> bool
val succs : t -> graph -> t seq
val preds : t -> graph -> t seq
val inputs : t -> graph -> edge seq
val outputs : t -> graph -> edge seq
val degree : ?dir:[ `In | `Out ] -> t -> graph -> int
val insert : t -> graph -> graph
val update : t -> label -> graph -> graph
val remove : t -> graph -> graph
val has_edge : t -> t -> graph -> bool
val edge : t -> t -> graph -> edge option
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list ->
'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi :
(Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list ->
f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array ->
'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t ->
key:Key.t -> data:'a -> 'a list t
val change :
'a t ->
Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t ->
f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t ->
f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key :
'a t -> Key.t -> (Key.t * 'a) option
val next_key :
'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) ->
Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) ->
'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare :
('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find :
t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf :
t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
Elt.t array -> t
val stable_dedup_list :
Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable :
t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) ->
'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one :
('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ ->
data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ ->
key:'a key_ -> data:'b -> unit
val remove_multi :
('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ ->
f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ ->
'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals :
('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr :
?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum ->
f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map :
'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t ->
Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove :
'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b ->
f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
end
module Edge :
sig
type t = edge
type node = node
type graph = t
type label = value
val create : node -> node -> label -> t
val label : t -> label
val src : t -> node
val dst : t -> node
val mem : t -> graph -> bool
val insert : t -> graph -> graph
val update : t -> label -> graph -> graph
val remove : t -> graph -> graph
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list ->
'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi :
(Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list ->
f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array ->
'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t ->
key:Key.t -> data:'a -> 'a list t
val change :
'a t ->
Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t ->
f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t ->
f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key :
'a t -> Key.t -> (Key.t * 'a) option
val next_key :
'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) ->
Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) ->
'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare :
('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find :
t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf :
t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
Elt.t array -> t
val stable_dedup_list :
Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable :
t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) ->
'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one :
('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ ->
data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ ->
key:'a key_ -> data:'b -> unit
val remove_multi :
('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ ->
f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ ->
'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals :
('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr :
?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum ->
f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map :
'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t ->
Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove :
'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b ->
f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
end
val empty : t
val nodes : t -> node seq
val edges : t -> edge seq
val is_directed : bool
val number_of_edges : t -> int
val number_of_nodes : t -> int
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness) Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a | `Right of 'a | `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map : t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable : t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) -> 'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) -> 'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one : ('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set : ('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ -> key:'a key_ -> data:'b -> unit
val remove_multi : ('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ -> f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ -> 'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals : ('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr : ?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum -> f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map : 'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t -> Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove : 'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b -> f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
val to_string : t -> string
val str : unit -> t -> string
val pps : unit -> t -> string
val ppo : out_channel -> t -> unit
val pp_seq :
Format.formatter -> t Core_kernel.Std.Sequence.t -> unit
val pp : Format.formatter -> t -> unit
end
module Word :
sig
type t
type node = node
type edge
module Node :
sig
type t = node
type graph = t
type label = node
type edge = edge
val create : label -> t
val label : t -> label
val mem : t -> graph -> bool
val succs : t -> graph -> t seq
val preds : t -> graph -> t seq
val inputs : t -> graph -> edge seq
val outputs : t -> graph -> edge seq
val degree : ?dir:[ `In | `Out ] -> t -> graph -> int
val insert : t -> graph -> graph
val update : t -> label -> graph -> graph
val remove : t -> graph -> graph
val has_edge : t -> t -> graph -> bool
val edge : t -> t -> graph -> edge option
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list ->
'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi :
(Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list ->
f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array ->
'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t ->
key:Key.t -> data:'a -> 'a list t
val change :
'a t ->
Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t ->
f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t ->
f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key :
'a t -> Key.t -> (Key.t * 'a) option
val next_key :
'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) ->
Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) ->
'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare :
('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find :
t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf :
t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
Elt.t array -> t
val stable_dedup_list :
Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable :
t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) ->
'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one :
('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ ->
data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ ->
key:'a key_ -> data:'b -> unit
val remove_multi :
('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ ->
f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ ->
'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals :
('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr :
?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum ->
f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map :
'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t ->
Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove :
'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b ->
f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
end
module Edge :
sig
type t = edge
type node = node
type graph = t
type label = word
val create : node -> node -> label -> t
val label : t -> label
val src : t -> node
val dst : t -> node
val mem : t -> graph -> bool
val insert : t -> graph -> graph
val update : t -> label -> graph -> graph
val remove : t -> graph -> graph
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list ->
'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi :
(Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list ->
f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array ->
'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t ->
key:Key.t -> data:'a -> 'a list t
val change :
'a t ->
Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t ->
f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t ->
f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key :
'a t -> Key.t -> (Key.t * 'a) option
val next_key :
'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) ->
Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) ->
'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare :
('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find :
t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf :
t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
Elt.t array -> t
val stable_dedup_list :
Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable :
t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) ->
'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one :
('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ ->
data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ ->
key:'a key_ -> data:'b -> unit
val remove_multi :
('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ ->
f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ ->
'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals :
('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr :
?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum ->
f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map :
'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t ->
Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove :
'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b ->
f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
end
val empty : t
val nodes : t -> node seq
val edges : t -> edge seq
val is_directed : bool
val number_of_edges : t -> int
val number_of_nodes : t -> int
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness) Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a | `Right of 'a | `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map : t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable : t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) -> 'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) -> 'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one : ('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set : ('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ -> key:'a key_ -> data:'b -> unit
val remove_multi : ('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ -> f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ -> 'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals : ('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr : ?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum -> f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map : 'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t -> Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove : 'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b -> f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
val to_string : t -> string
val str : unit -> t -> string
val pps : unit -> t -> string
val ppo : out_channel -> t -> unit
val pp_seq :
Format.formatter -> t Core_kernel.Std.Sequence.t -> unit
val pp : Format.formatter -> t -> unit
end
module Int :
sig
type t
type node = node
type edge
module Node :
sig
type t = node
type graph = t
type label = node
type edge = edge
val create : label -> t
val label : t -> label
val mem : t -> graph -> bool
val succs : t -> graph -> t seq
val preds : t -> graph -> t seq
val inputs : t -> graph -> edge seq
val outputs : t -> graph -> edge seq
val degree : ?dir:[ `In | `Out ] -> t -> graph -> int
val insert : t -> graph -> graph
val update : t -> label -> graph -> graph
val remove : t -> graph -> graph
val has_edge : t -> t -> graph -> bool
val edge : t -> t -> graph -> edge option
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list ->
'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi :
(Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list ->
f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array ->
'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t ->
key:Key.t -> data:'a -> 'a list t
val change :
'a t ->
Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t ->
f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t ->
f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key :
'a t -> Key.t -> (Key.t * 'a) option
val next_key :
'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) ->
Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) ->
'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare :
('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find :
t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf :
t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
Elt.t array -> t
val stable_dedup_list :
Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable :
t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) ->
'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one :
('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ ->
data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ ->
key:'a key_ -> data:'b -> unit
val remove_multi :
('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ ->
f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ ->
'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals :
('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr :
?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum ->
f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map :
'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t ->
Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove :
'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b ->
f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
end
module Edge :
sig
type t = edge
type node = node
type graph = t
type label = int
val create : node -> node -> label -> t
val label : t -> label
val src : t -> node
val dst : t -> node
val mem : t -> graph -> bool
val insert : t -> graph -> graph
val update : t -> label -> graph -> graph
val remove : t -> graph -> graph
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list ->
'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi :
(Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list ->
f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array ->
'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t ->
key:Key.t -> data:'a -> 'a list t
val change :
'a t ->
Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t ->
f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t ->
f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key :
'a t -> Key.t -> (Key.t * 'a) option
val next_key :
'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) ->
Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) ->
'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare :
('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find :
t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf :
t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
Elt.t array -> t
val stable_dedup_list :
Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable :
t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) ->
'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one :
('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ ->
data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ ->
key:'a key_ -> data:'b -> unit
val remove_multi :
('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ ->
f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ ->
'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals :
('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr :
?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum ->
f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map :
'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t ->
Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove :
'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b ->
f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
end
val empty : t
val nodes : t -> node seq
val edges : t -> edge seq
val is_directed : bool
val number_of_edges : t -> int
val number_of_nodes : t -> int
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness) Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a | `Right of 'a | `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map : t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable : t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) -> 'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) -> 'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one : ('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set : ('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ -> key:'a key_ -> data:'b -> unit
val remove_multi : ('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ -> f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ -> 'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals : ('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr : ?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum -> f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map : 'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t -> Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove : 'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b -> f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
val to_string : t -> string
val str : unit -> t -> string
val pps : unit -> t -> string
val ppo : out_channel -> t -> unit
val pp_seq :
Format.formatter -> t Core_kernel.Std.Sequence.t -> unit
val pp : Format.formatter -> t -> unit
end
module String :
sig
type t
type node = node
type edge
module Node :
sig
type t = node
type graph = t
type label = node
type edge = edge
val create : label -> t
val label : t -> label
val mem : t -> graph -> bool
val succs : t -> graph -> t seq
val preds : t -> graph -> t seq
val inputs : t -> graph -> edge seq
val outputs : t -> graph -> edge seq
val degree : ?dir:[ `In | `Out ] -> t -> graph -> int
val insert : t -> graph -> graph
val update : t -> label -> graph -> graph
val remove : t -> graph -> graph
val has_edge : t -> t -> graph -> bool
val edge : t -> t -> graph -> edge option
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list ->
'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi :
(Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list ->
f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array ->
'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t ->
key:Key.t -> data:'a -> 'a list t
val change :
'a t ->
Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t ->
f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t ->
f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key :
'a t -> Key.t -> (Key.t * 'a) option
val next_key :
'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) ->
Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) ->
'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare :
('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find :
t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf :
t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
Elt.t array -> t
val stable_dedup_list :
Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable :
t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) ->
'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one :
('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ ->
data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ ->
key:'a key_ -> data:'b -> unit
val remove_multi :
('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ ->
f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ ->
'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals :
('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr :
?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum ->
f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map :
'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t ->
Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove :
'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b ->
f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
end
module Edge :
sig
type t = edge
type node = node
type graph = t
type label = string
val create : node -> node -> label -> t
val label : t -> label
val src : t -> node
val dst : t -> node
val mem : t -> graph -> bool
val insert : t -> graph -> graph
val update : t -> label -> graph -> graph
val remove : t -> graph -> graph
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list ->
'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi :
(Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list ->
f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array ->
'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t ->
key:Key.t -> data:'a -> 'a list t
val change :
'a t ->
Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t ->
f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t ->
f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key :
'a t -> Key.t -> (Key.t * 'a) option
val next_key :
'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) ->
Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) ->
'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare :
('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find :
t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf :
t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
Elt.t array -> t
val stable_dedup_list :
Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable :
t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) ->
'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one :
('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ ->
data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ ->
key:'a key_ -> data:'b -> unit
val remove_multi :
('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ ->
f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ ->
'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals :
('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr :
?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum ->
f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map :
'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t ->
Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove :
'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b ->
f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
end
val empty : t
val nodes : t -> node seq
val edges : t -> edge seq
val is_directed : bool
val number_of_edges : t -> int
val number_of_nodes : t -> int
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness) Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a | `Right of 'a | `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map : t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable : t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) -> 'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) -> 'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one : ('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set : ('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ -> key:'a key_ -> data:'b -> unit
val remove_multi : ('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ -> f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ -> 'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals : ('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr : ?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum -> f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map : 'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t -> Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove : 'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b -> f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
val to_string : t -> string
val str : unit -> t -> string
val pps : unit -> t -> string
val ppo : out_channel -> t -> unit
val pp_seq :
Format.formatter -> t Core_kernel.Std.Sequence.t -> unit
val pp : Format.formatter -> t -> unit
end
module Exp :
sig
type t
type node = node
type edge
module Node :
sig
type t = node
type graph = t
type label = node
type edge = edge
val create : label -> t
val label : t -> label
val mem : t -> graph -> bool
val succs : t -> graph -> t seq
val preds : t -> graph -> t seq
val inputs : t -> graph -> edge seq
val outputs : t -> graph -> edge seq
val degree : ?dir:[ `In | `Out ] -> t -> graph -> int
val insert : t -> graph -> graph
val update : t -> label -> graph -> graph
val remove : t -> graph -> graph
val has_edge : t -> t -> graph -> bool
val edge : t -> t -> graph -> edge option
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list ->
'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi :
(Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list ->
f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array ->
'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t ->
key:Key.t -> data:'a -> 'a list t
val change :
'a t ->
Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t ->
f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t ->
f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key :
'a t -> Key.t -> (Key.t * 'a) option
val next_key :
'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) ->
Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) ->
'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare :
('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find :
t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf :
t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
Elt.t array -> t
val stable_dedup_list :
Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable :
t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) ->
'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one :
('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ ->
data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ ->
key:'a key_ -> data:'b -> unit
val remove_multi :
('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ ->
f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ ->
'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals :
('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr :
?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum ->
f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map :
'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t ->
Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove :
'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b ->
f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
end
module Edge :
sig
type t = edge
type node = node
type graph = t
type label = exp
val create : node -> node -> label -> t
val label : t -> label
val src : t -> node
val dst : t -> node
val mem : t -> graph -> bool
val insert : t -> graph -> graph
val update : t -> label -> graph -> graph
val remove : t -> graph -> graph
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list ->
'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi :
(Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list ->
f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array ->
'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t ->
key:Key.t -> data:'a -> 'a list t
val change :
'a t ->
Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t ->
f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t ->
f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key :
'a t -> Key.t -> (Key.t * 'a) option
val next_key :
'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) ->
Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) ->
'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare :
('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find :
t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf :
t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
Elt.t array -> t
val stable_dedup_list :
Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable :
t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) ->
'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one :
('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ ->
data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ ->
key:'a key_ -> data:'b -> unit
val remove_multi :
('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ ->
f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ ->
'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals :
('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr :
?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum ->
f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map :
'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t ->
Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove :
'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b ->
f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
end
val empty : t
val nodes : t -> node seq
val edges : t -> edge seq
val is_directed : bool
val number_of_edges : t -> int
val number_of_nodes : t -> int
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness) Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a | `Right of 'a | `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map : t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable : t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) -> 'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) -> 'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one : ('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set : ('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ -> key:'a key_ -> data:'b -> unit
val remove_multi : ('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ -> f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ -> 'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals : ('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr : ?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum -> f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map : 'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t -> Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove : 'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b -> f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
val to_string : t -> string
val str : unit -> t -> string
val pps : unit -> t -> string
val ppo : out_channel -> t -> unit
val pp_seq :
Format.formatter -> t Core_kernel.Std.Sequence.t -> unit
val pp : Format.formatter -> t -> unit
end
module Stmt :
sig
type t
type node = node
type edge
module Node :
sig
type t = node
type graph = t
type label = node
type edge = edge
val create : label -> t
val label : t -> label
val mem : t -> graph -> bool
val succs : t -> graph -> t seq
val preds : t -> graph -> t seq
val inputs : t -> graph -> edge seq
val outputs : t -> graph -> edge seq
val degree : ?dir:[ `In | `Out ] -> t -> graph -> int
val insert : t -> graph -> graph
val update : t -> label -> graph -> graph
val remove : t -> graph -> graph
val has_edge : t -> t -> graph -> bool
val edge : t -> t -> graph -> edge option
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list ->
'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi :
(Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list ->
f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array ->
'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t ->
key:Key.t -> data:'a -> 'a list t
val change :
'a t ->
Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t ->
f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t ->
f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key :
'a t -> Key.t -> (Key.t * 'a) option
val next_key :
'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) ->
Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) ->
'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare :
('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find :
t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf :
t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
Elt.t array -> t
val stable_dedup_list :
Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable :
t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) ->
'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one :
('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ ->
data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ ->
key:'a key_ -> data:'b -> unit
val remove_multi :
('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ ->
f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ ->
'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals :
('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr :
?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum ->
f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map :
'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t ->
Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove :
'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b ->
f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
end
module Edge :
sig
type t = edge
type node = node
type graph = t
type label = stmt
val create : node -> node -> label -> t
val label : t -> label
val src : t -> node
val dst : t -> node
val mem : t -> graph -> bool
val insert : t -> graph -> graph
val update : t -> label -> graph -> graph
val remove : t -> graph -> graph
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list ->
'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi :
(Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list ->
f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array ->
'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t ->
key:Key.t -> data:'a -> 'a list t
val change :
'a t ->
Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t ->
f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t ->
f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key :
'a t -> Key.t -> (Key.t * 'a) option
val next_key :
'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) ->
Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) ->
'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare :
('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find :
t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf :
t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
Elt.t array -> t
val stable_dedup_list :
Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable :
t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) ->
'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one :
('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ ->
data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ ->
key:'a key_ -> data:'b -> unit
val remove_multi :
('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ ->
f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ ->
'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals :
('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr :
?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum ->
f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map :
'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t ->
Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove :
'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b ->
f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
end
val empty : t
val nodes : t -> node seq
val edges : t -> edge seq
val is_directed : bool
val number_of_edges : t -> int
val number_of_nodes : t -> int
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness) Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a | `Right of 'a | `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map : t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable : t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) -> 'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) -> 'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one : ('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set : ('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ -> key:'a key_ -> data:'b -> unit
val remove_multi : ('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ -> f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ -> 'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals : ('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr : ?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum -> f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map : 'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t -> Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove : 'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b -> f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
val to_string : t -> string
val str : unit -> t -> string
val pps : unit -> t -> string
val ppo : out_channel -> t -> unit
val pp_seq :
Format.formatter -> t Core_kernel.Std.Sequence.t -> unit
val pp : Format.formatter -> t -> unit
end
module Var :
sig
type t
type node = node
type edge
module Node :
sig
type t = node
type graph = t
type label = node
type edge = edge
val create : label -> t
val label : t -> label
val mem : t -> graph -> bool
val succs : t -> graph -> t seq
val preds : t -> graph -> t seq
val inputs : t -> graph -> edge seq
val outputs : t -> graph -> edge seq
val degree : ?dir:[ `In | `Out ] -> t -> graph -> int
val insert : t -> graph -> graph
val update : t -> label -> graph -> graph
val remove : t -> graph -> graph
val has_edge : t -> t -> graph -> bool
val edge : t -> t -> graph -> edge option
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list ->
'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi :
(Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list ->
f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array ->
'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t ->
key:Key.t -> data:'a -> 'a list t
val change :
'a t ->
Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t ->
f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t ->
f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key :
'a t -> Key.t -> (Key.t * 'a) option
val next_key :
'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) ->
Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) ->
'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare :
('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find :
t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf :
t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
Elt.t array -> t
val stable_dedup_list :
Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable :
t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) ->
'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one :
('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ ->
data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ ->
key:'a key_ -> data:'b -> unit
val remove_multi :
('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ ->
f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ ->
'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals :
('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr :
?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum ->
f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map :
'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t ->
Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove :
'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b ->
f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
end
module Edge :
sig
type t = edge
type node = node
type graph = t
type label = var
val create : node -> node -> label -> t
val label : t -> label
val src : t -> node
val dst : t -> node
val mem : t -> graph -> bool
val insert : t -> graph -> graph
val update : t -> label -> graph -> graph
val remove : t -> graph -> graph
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list ->
'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi :
(Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list ->
f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array ->
'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t ->
key:Key.t -> data:'a -> 'a list t
val change :
'a t ->
Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t ->
f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t ->
f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key :
'a t -> Key.t -> (Key.t * 'a) option
val next_key :
'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) ->
Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) ->
'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare :
('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find :
t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf :
t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
Elt.t array -> t
val stable_dedup_list :
Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable :
t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) ->
'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one :
('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ ->
data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ ->
key:'a key_ -> data:'b -> unit
val remove_multi :
('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ ->
f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ ->
'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals :
('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr :
?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum ->
f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map :
'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t ->
Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove :
'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b ->
f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
end
val empty : t
val nodes : t -> node seq
val edges : t -> edge seq
val is_directed : bool
val number_of_edges : t -> int
val number_of_nodes : t -> int
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness) Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a | `Right of 'a | `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map : t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable : t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) -> 'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) -> 'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one : ('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set : ('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ -> key:'a key_ -> data:'b -> unit
val remove_multi : ('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ -> f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ -> 'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals : ('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr : ?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum -> f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map : 'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t -> Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove : 'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b -> f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
val to_string : t -> string
val str : unit -> t -> string
val pps : unit -> t -> string
val ppo : out_channel -> t -> unit
val pp_seq :
Format.formatter -> t Core_kernel.Std.Sequence.t -> unit
val pp : Format.formatter -> t -> unit
end
module Tid :
sig
type t
type node = node
type edge
module Node :
sig
type t = node
type graph = t
type label = node
type edge = edge
val create : label -> t
val label : t -> label
val mem : t -> graph -> bool
val succs : t -> graph -> t seq
val preds : t -> graph -> t seq
val inputs : t -> graph -> edge seq
val outputs : t -> graph -> edge seq
val degree : ?dir:[ `In | `Out ] -> t -> graph -> int
val insert : t -> graph -> graph
val update : t -> label -> graph -> graph
val remove : t -> graph -> graph
val has_edge : t -> t -> graph -> bool
val edge : t -> t -> graph -> edge option
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list ->
'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi :
(Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list ->
f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array ->
'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t ->
key:Key.t -> data:'a -> 'a list t
val change :
'a t ->
Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t ->
f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t ->
f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key :
'a t -> Key.t -> (Key.t * 'a) option
val next_key :
'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) ->
Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) ->
'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare :
('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find :
t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf :
t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
Elt.t array -> t
val stable_dedup_list :
Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable :
t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) ->
'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one :
('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ ->
data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ ->
key:'a key_ -> data:'b -> unit
val remove_multi :
('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ ->
f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ ->
'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals :
('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr :
?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum ->
f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map :
'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t ->
Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove :
'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b ->
f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
end
module Edge :
sig
type t = edge
type node = node
type graph = t
type label = tid
val create : node -> node -> label -> t
val label : t -> label
val src : t -> node
val dst : t -> node
val mem : t -> graph -> bool
val insert : t -> graph -> graph
val update : t -> label -> graph -> graph
val remove : t -> graph -> graph
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list ->
'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi :
(Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list ->
f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array ->
'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t ->
key:Key.t -> data:'a -> 'a list t
val change :
'a t ->
Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t ->
f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t ->
f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key :
'a t -> Key.t -> (Key.t * 'a) option
val next_key :
'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) ->
Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) ->
'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare :
('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find :
t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf :
t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
Elt.t array -> t
val stable_dedup_list :
Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable :
t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) ->
'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one :
('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ ->
data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ ->
key:'a key_ -> data:'b -> unit
val remove_multi :
('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ ->
f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ ->
'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals :
('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr :
?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum ->
f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map :
'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t ->
Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove :
'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b ->
f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
end
val empty : t
val nodes : t -> node seq
val edges : t -> edge seq
val is_directed : bool
val number_of_edges : t -> int
val number_of_nodes : t -> int
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness) Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a | `Right of 'a | `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map : t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable : t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) -> 'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) -> 'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one : ('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set : ('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ -> key:'a key_ -> data:'b -> unit
val remove_multi : ('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ -> f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ -> 'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals : ('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr : ?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum -> f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map : 'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t -> Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove : 'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b -> f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
val to_string : t -> string
val str : unit -> t -> string
val pps : unit -> t -> string
val ppo : out_channel -> t -> unit
val pp_seq :
Format.formatter -> t Core_kernel.Std.Sequence.t -> unit
val pp : Format.formatter -> t -> unit
end
module Type :
sig
type t
type node = node
type edge
module Node :
sig
type t = node
type graph = t
type label = node
type edge = edge
val create : label -> t
val label : t -> label
val mem : t -> graph -> bool
val succs : t -> graph -> t seq
val preds : t -> graph -> t seq
val inputs : t -> graph -> edge seq
val outputs : t -> graph -> edge seq
val degree : ?dir:[ `In | `Out ] -> t -> graph -> int
val insert : t -> graph -> graph
val update : t -> label -> graph -> graph
val remove : t -> graph -> graph
val has_edge : t -> t -> graph -> bool
val edge : t -> t -> graph -> edge option
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list ->
'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi :
(Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list ->
f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array ->
'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t ->
key:Key.t -> data:'a -> 'a list t
val change :
'a t ->
Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t ->
f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t ->
f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key :
'a t -> Key.t -> (Key.t * 'a) option
val next_key :
'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) ->
Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) ->
'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare :
('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find :
t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf :
t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
Elt.t array -> t
val stable_dedup_list :
Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable :
t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) ->
'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one :
('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ ->
data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ ->
key:'a key_ -> data:'b -> unit
val remove_multi :
('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ ->
f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ ->
'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals :
('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr :
?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum ->
f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map :
'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t ->
Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove :
'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b ->
f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
end
module Edge :
sig
type t = edge
type node = node
type graph = t
type label = typ
val create : node -> node -> label -> t
val label : t -> label
val src : t -> node
val dst : t -> node
val mem : t -> graph -> bool
val insert : t -> graph -> graph
val update : t -> label -> graph -> graph
val remove : t -> graph -> graph
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list ->
'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi :
(Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list ->
f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array ->
'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t ->
key:Key.t -> data:'a -> 'a list t
val change :
'a t ->
Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t ->
f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t ->
f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key :
'a t -> Key.t -> (Key.t * 'a) option
val next_key :
'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) ->
Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) ->
'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare :
('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find :
t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf :
t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
Elt.t array -> t
val stable_dedup_list :
Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable :
t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) ->
'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one :
('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ ->
data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ ->
key:'a key_ -> data:'b -> unit
val remove_multi :
('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ ->
f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ ->
'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals :
('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr :
?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum ->
f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map :
'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t ->
Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove :
'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b ->
f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
end
val empty : t
val nodes : t -> node seq
val edges : t -> edge seq
val is_directed : bool
val number_of_edges : t -> int
val number_of_nodes : t -> int
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness) Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a | `Right of 'a | `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map : t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable : t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) -> 'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) -> 'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one : ('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set : ('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ -> key:'a key_ -> data:'b -> unit
val remove_multi : ('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ -> f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ -> 'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals : ('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr : ?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum -> f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map : 'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t -> Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove : 'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b -> f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
val to_string : t -> string
val str : unit -> t -> string
val pps : unit -> t -> string
val ppo : out_channel -> t -> unit
val pp_seq :
Format.formatter -> t Core_kernel.Std.Sequence.t -> unit
val pp : Format.formatter -> t -> unit
end
module Tree :
sig
type t = node tree
val to_string : t -> string
val str : unit -> t -> string
val pps : unit -> t -> string
val ppo : out_channel -> t -> unit
val pp_seq :
Format.formatter -> t Core_kernel.Std.Sequence.t -> unit
val pp : Format.formatter -> t -> unit
end
module Frontier :
sig
type t = node frontier
val to_string : t -> string
val str : unit -> t -> string
val pps : unit -> t -> string
val ppo : out_channel -> t -> unit
val pp_seq :
Format.formatter -> t Core_kernel.Std.Sequence.t -> unit
val pp : Format.formatter -> t -> unit
end
module Path :
sig
type t = node path
val to_string : t -> string
val str : unit -> t -> string
val pps : unit -> t -> string
val ppo : out_channel -> t -> unit
val pp_seq :
Format.formatter -> t Core_kernel.Std.Sequence.t -> unit
val pp : Format.formatter -> t -> unit
end
module Partition :
sig
type t = node partition
val to_string : t -> string
val str : unit -> t -> string
val pps : unit -> t -> string
val ppo : out_channel -> t -> unit
val pp_seq :
Format.formatter -> t Core_kernel.Std.Sequence.t -> unit
val pp : Format.formatter -> t -> unit
end
module Group :
sig
type t = node group
val to_string : t -> string
val str : unit -> t -> string
val pps : unit -> t -> string
val ppo : out_channel -> t -> unit
val pp_seq :
Format.formatter -> t Core_kernel.Std.Sequence.t -> unit
val pp : Format.formatter -> t -> unit
end
end
module Word :
sig
type node = word
module Bool :
sig
type t
type node = node
type edge
module Node :
sig
type t = node
type graph = t
type label = node
type edge = edge
val create : label -> t
val label : t -> label
val mem : t -> graph -> bool
val succs : t -> graph -> t seq
val preds : t -> graph -> t seq
val inputs : t -> graph -> edge seq
val outputs : t -> graph -> edge seq
val degree : ?dir:[ `In | `Out ] -> t -> graph -> int
val insert : t -> graph -> graph
val update : t -> label -> graph -> graph
val remove : t -> graph -> graph
val has_edge : t -> t -> graph -> bool
val edge : t -> t -> graph -> edge option
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list ->
'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi :
(Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list ->
f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array ->
'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t ->
key:Key.t -> data:'a -> 'a list t
val change :
'a t ->
Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t ->
f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t ->
f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key :
'a t -> Key.t -> (Key.t * 'a) option
val next_key :
'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) ->
Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) ->
'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare :
('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find :
t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf :
t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
Elt.t array -> t
val stable_dedup_list :
Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable :
t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) ->
'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one :
('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ ->
data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ ->
key:'a key_ -> data:'b -> unit
val remove_multi :
('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ ->
f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ ->
'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals :
('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr :
?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum ->
f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map :
'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t ->
Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove :
'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b ->
f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
end
module Edge :
sig
type t = edge
type node = node
type graph = t
type label = bool
val create : node -> node -> label -> t
val label : t -> label
val src : t -> node
val dst : t -> node
val mem : t -> graph -> bool
val insert : t -> graph -> graph
val update : t -> label -> graph -> graph
val remove : t -> graph -> graph
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list ->
'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi :
(Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list ->
f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array ->
'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t ->
key:Key.t -> data:'a -> 'a list t
val change :
'a t ->
Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t ->
f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t ->
f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key :
'a t -> Key.t -> (Key.t * 'a) option
val next_key :
'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) ->
Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) ->
'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare :
('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find :
t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf :
t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
Elt.t array -> t
val stable_dedup_list :
Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable :
t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) ->
'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one :
('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ ->
data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ ->
key:'a key_ -> data:'b -> unit
val remove_multi :
('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ ->
f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ ->
'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals :
('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr :
?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum ->
f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map :
'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t ->
Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove :
'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b ->
f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
end
val empty : t
val nodes : t -> node seq
val edges : t -> edge seq
val is_directed : bool
val number_of_edges : t -> int
val number_of_nodes : t -> int
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness) Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a | `Right of 'a | `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map : t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable : t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) -> 'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) -> 'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one : ('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set : ('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ -> key:'a key_ -> data:'b -> unit
val remove_multi : ('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ -> f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ -> 'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals : ('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr : ?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum -> f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map : 'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t -> Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove : 'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b -> f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
val to_string : t -> string
val str : unit -> t -> string
val pps : unit -> t -> string
val ppo : out_channel -> t -> unit
val pp_seq :
Format.formatter -> t Core_kernel.Std.Sequence.t -> unit
val pp : Format.formatter -> t -> unit
end
module Unit :
sig
type t
type node = node
type edge
module Node :
sig
type t = node
type graph = t
type label = node
type edge = edge
val create : label -> t
val label : t -> label
val mem : t -> graph -> bool
val succs : t -> graph -> t seq
val preds : t -> graph -> t seq
val inputs : t -> graph -> edge seq
val outputs : t -> graph -> edge seq
val degree : ?dir:[ `In | `Out ] -> t -> graph -> int
val insert : t -> graph -> graph
val update : t -> label -> graph -> graph
val remove : t -> graph -> graph
val has_edge : t -> t -> graph -> bool
val edge : t -> t -> graph -> edge option
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list ->
'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi :
(Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list ->
f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array ->
'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t ->
key:Key.t -> data:'a -> 'a list t
val change :
'a t ->
Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t ->
f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t ->
f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key :
'a t -> Key.t -> (Key.t * 'a) option
val next_key :
'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) ->
Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) ->
'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare :
('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find :
t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf :
t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
Elt.t array -> t
val stable_dedup_list :
Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable :
t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) ->
'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one :
('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ ->
data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ ->
key:'a key_ -> data:'b -> unit
val remove_multi :
('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ ->
f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ ->
'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals :
('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr :
?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum ->
f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map :
'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t ->
Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove :
'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b ->
f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
end
module Edge :
sig
type t = edge
type node = node
type graph = t
type label = unit
val create : node -> node -> label -> t
val label : t -> label
val src : t -> node
val dst : t -> node
val mem : t -> graph -> bool
val insert : t -> graph -> graph
val update : t -> label -> graph -> graph
val remove : t -> graph -> graph
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list ->
'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi :
(Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list ->
f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array ->
'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t ->
key:Key.t -> data:'a -> 'a list t
val change :
'a t ->
Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t ->
f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t ->
f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key :
'a t -> Key.t -> (Key.t * 'a) option
val next_key :
'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) ->
Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) ->
'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare :
('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find :
t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf :
t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
Elt.t array -> t
val stable_dedup_list :
Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable :
t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) ->
'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one :
('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ ->
data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ ->
key:'a key_ -> data:'b -> unit
val remove_multi :
('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ ->
f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ ->
'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals :
('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr :
?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum ->
f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map :
'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t ->
Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove :
'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b ->
f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
end
val empty : t
val nodes : t -> node seq
val edges : t -> edge seq
val is_directed : bool
val number_of_edges : t -> int
val number_of_nodes : t -> int
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness) Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a | `Right of 'a | `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map : t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable : t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) -> 'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) -> 'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one : ('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set : ('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ -> key:'a key_ -> data:'b -> unit
val remove_multi : ('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ -> f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ -> 'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals : ('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr : ?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum -> f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map : 'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t -> Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove : 'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b -> f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
val to_string : t -> string
val str : unit -> t -> string
val pps : unit -> t -> string
val ppo : out_channel -> t -> unit
val pp_seq :
Format.formatter -> t Core_kernel.Std.Sequence.t -> unit
val pp : Format.formatter -> t -> unit
end
module Value :
sig
type t
type node = node
type edge
module Node :
sig
type t = node
type graph = t
type label = node
type edge = edge
val create : label -> t
val label : t -> label
val mem : t -> graph -> bool
val succs : t -> graph -> t seq
val preds : t -> graph -> t seq
val inputs : t -> graph -> edge seq
val outputs : t -> graph -> edge seq
val degree : ?dir:[ `In | `Out ] -> t -> graph -> int
val insert : t -> graph -> graph
val update : t -> label -> graph -> graph
val remove : t -> graph -> graph
val has_edge : t -> t -> graph -> bool
val edge : t -> t -> graph -> edge option
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list ->
'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi :
(Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list ->
f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array ->
'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t ->
key:Key.t -> data:'a -> 'a list t
val change :
'a t ->
Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t ->
f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t ->
f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key :
'a t -> Key.t -> (Key.t * 'a) option
val next_key :
'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) ->
Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) ->
'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare :
('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find :
t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf :
t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
Elt.t array -> t
val stable_dedup_list :
Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable :
t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) ->
'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one :
('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ ->
data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ ->
key:'a key_ -> data:'b -> unit
val remove_multi :
('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ ->
f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ ->
'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals :
('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr :
?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum ->
f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map :
'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t ->
Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove :
'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b ->
f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
end
module Edge :
sig
type t = edge
type node = node
type graph = t
type label = value
val create : node -> node -> label -> t
val label : t -> label
val src : t -> node
val dst : t -> node
val mem : t -> graph -> bool
val insert : t -> graph -> graph
val update : t -> label -> graph -> graph
val remove : t -> graph -> graph
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list ->
'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi :
(Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list ->
f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array ->
'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t ->
key:Key.t -> data:'a -> 'a list t
val change :
'a t ->
Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t ->
f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t ->
f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key :
'a t -> Key.t -> (Key.t * 'a) option
val next_key :
'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) ->
Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) ->
'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare :
('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find :
t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf :
t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
Elt.t array -> t
val stable_dedup_list :
Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable :
t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) ->
'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one :
('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ ->
data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ ->
key:'a key_ -> data:'b -> unit
val remove_multi :
('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ ->
f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ ->
'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals :
('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr :
?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum ->
f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map :
'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t ->
Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove :
'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b ->
f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
end
val empty : t
val nodes : t -> node seq
val edges : t -> edge seq
val is_directed : bool
val number_of_edges : t -> int
val number_of_nodes : t -> int
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness) Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a | `Right of 'a | `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map : t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable : t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) -> 'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) -> 'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one : ('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set : ('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ -> key:'a key_ -> data:'b -> unit
val remove_multi : ('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ -> f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ -> 'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals : ('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr : ?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum -> f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map : 'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t -> Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove : 'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b -> f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
val to_string : t -> string
val str : unit -> t -> string
val pps : unit -> t -> string
val ppo : out_channel -> t -> unit
val pp_seq :
Format.formatter -> t Core_kernel.Std.Sequence.t -> unit
val pp : Format.formatter -> t -> unit
end
module Word :
sig
type t
type node = node
type edge
module Node :
sig
type t = node
type graph = t
type label = node
type edge = edge
val create : label -> t
val label : t -> label
val mem : t -> graph -> bool
val succs : t -> graph -> t seq
val preds : t -> graph -> t seq
val inputs : t -> graph -> edge seq
val outputs : t -> graph -> edge seq
val degree : ?dir:[ `In | `Out ] -> t -> graph -> int
val insert : t -> graph -> graph
val update : t -> label -> graph -> graph
val remove : t -> graph -> graph
val has_edge : t -> t -> graph -> bool
val edge : t -> t -> graph -> edge option
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list ->
'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi :
(Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list ->
f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array ->
'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t ->
key:Key.t -> data:'a -> 'a list t
val change :
'a t ->
Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t ->
f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t ->
f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key :
'a t -> Key.t -> (Key.t * 'a) option
val next_key :
'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) ->
Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) ->
'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare :
('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find :
t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf :
t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
Elt.t array -> t
val stable_dedup_list :
Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable :
t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) ->
'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one :
('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ ->
data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ ->
key:'a key_ -> data:'b -> unit
val remove_multi :
('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ ->
f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ ->
'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals :
('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr :
?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum ->
f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map :
'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t ->
Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove :
'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b ->
f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
end
module Edge :
sig
type t = edge
type node = node
type graph = t
type label = word
val create : node -> node -> label -> t
val label : t -> label
val src : t -> node
val dst : t -> node
val mem : t -> graph -> bool
val insert : t -> graph -> graph
val update : t -> label -> graph -> graph
val remove : t -> graph -> graph
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list ->
'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi :
(Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list ->
f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array ->
'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t ->
key:Key.t -> data:'a -> 'a list t
val change :
'a t ->
Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t ->
f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t ->
f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key :
'a t -> Key.t -> (Key.t * 'a) option
val next_key :
'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) ->
Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) ->
'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare :
('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find :
t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf :
t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
Elt.t array -> t
val stable_dedup_list :
Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable :
t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) ->
'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one :
('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ ->
data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ ->
key:'a key_ -> data:'b -> unit
val remove_multi :
('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ ->
f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ ->
'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals :
('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr :
?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum ->
f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map :
'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t ->
Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove :
'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b ->
f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
end
val empty : t
val nodes : t -> node seq
val edges : t -> edge seq
val is_directed : bool
val number_of_edges : t -> int
val number_of_nodes : t -> int
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness) Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a | `Right of 'a | `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map : t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable : t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) -> 'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) -> 'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one : ('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set : ('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ -> key:'a key_ -> data:'b -> unit
val remove_multi : ('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ -> f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ -> 'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals : ('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr : ?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum -> f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map : 'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t -> Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove : 'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b -> f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
val to_string : t -> string
val str : unit -> t -> string
val pps : unit -> t -> string
val ppo : out_channel -> t -> unit
val pp_seq :
Format.formatter -> t Core_kernel.Std.Sequence.t -> unit
val pp : Format.formatter -> t -> unit
end
module Int :
sig
type t
type node = node
type edge
module Node :
sig
type t = node
type graph = t
type label = node
type edge = edge
val create : label -> t
val label : t -> label
val mem : t -> graph -> bool
val succs : t -> graph -> t seq
val preds : t -> graph -> t seq
val inputs : t -> graph -> edge seq
val outputs : t -> graph -> edge seq
val degree : ?dir:[ `In | `Out ] -> t -> graph -> int
val insert : t -> graph -> graph
val update : t -> label -> graph -> graph
val remove : t -> graph -> graph
val has_edge : t -> t -> graph -> bool
val edge : t -> t -> graph -> edge option
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list ->
'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi :
(Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list ->
f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array ->
'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t ->
key:Key.t -> data:'a -> 'a list t
val change :
'a t ->
Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t ->
f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t ->
f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key :
'a t -> Key.t -> (Key.t * 'a) option
val next_key :
'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) ->
Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) ->
'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare :
('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find :
t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf :
t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
Elt.t array -> t
val stable_dedup_list :
Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable :
t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) ->
'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one :
('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ ->
data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ ->
key:'a key_ -> data:'b -> unit
val remove_multi :
('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ ->
f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ ->
'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals :
('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr :
?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum ->
f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map :
'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t ->
Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove :
'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b ->
f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
end
module Edge :
sig
type t = edge
type node = node
type graph = t
type label = int
val create : node -> node -> label -> t
val label : t -> label
val src : t -> node
val dst : t -> node
val mem : t -> graph -> bool
val insert : t -> graph -> graph
val update : t -> label -> graph -> graph
val remove : t -> graph -> graph
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list ->
'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi :
(Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list ->
f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array ->
'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t ->
key:Key.t -> data:'a -> 'a list t
val change :
'a t ->
Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t ->
f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t ->
f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key :
'a t -> Key.t -> (Key.t * 'a) option
val next_key :
'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) ->
Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) ->
'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare :
('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find :
t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf :
t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
Elt.t array -> t
val stable_dedup_list :
Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable :
t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) ->
'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one :
('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ ->
data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ ->
key:'a key_ -> data:'b -> unit
val remove_multi :
('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ ->
f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ ->
'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals :
('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr :
?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum ->
f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map :
'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t ->
Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove :
'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b ->
f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
end
val empty : t
val nodes : t -> node seq
val edges : t -> edge seq
val is_directed : bool
val number_of_edges : t -> int
val number_of_nodes : t -> int
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness) Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a | `Right of 'a | `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map : t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable : t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) -> 'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) -> 'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one : ('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set : ('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ -> key:'a key_ -> data:'b -> unit
val remove_multi : ('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ -> f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ -> 'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals : ('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr : ?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum -> f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map : 'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t -> Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove : 'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b -> f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
val to_string : t -> string
val str : unit -> t -> string
val pps : unit -> t -> string
val ppo : out_channel -> t -> unit
val pp_seq :
Format.formatter -> t Core_kernel.Std.Sequence.t -> unit
val pp : Format.formatter -> t -> unit
end
module String :
sig
type t
type node = node
type edge
module Node :
sig
type t = node
type graph = t
type label = node
type edge = edge
val create : label -> t
val label : t -> label
val mem : t -> graph -> bool
val succs : t -> graph -> t seq
val preds : t -> graph -> t seq
val inputs : t -> graph -> edge seq
val outputs : t -> graph -> edge seq
val degree : ?dir:[ `In | `Out ] -> t -> graph -> int
val insert : t -> graph -> graph
val update : t -> label -> graph -> graph
val remove : t -> graph -> graph
val has_edge : t -> t -> graph -> bool
val edge : t -> t -> graph -> edge option
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list ->
'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi :
(Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list ->
f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array ->
'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t ->
key:Key.t -> data:'a -> 'a list t
val change :
'a t ->
Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t ->
f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t ->
f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key :
'a t -> Key.t -> (Key.t * 'a) option
val next_key :
'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) ->
Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) ->
'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare :
('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find :
t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf :
t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
Elt.t array -> t
val stable_dedup_list :
Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable :
t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) ->
'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one :
('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ ->
data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ ->
key:'a key_ -> data:'b -> unit
val remove_multi :
('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ ->
f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ ->
'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals :
('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr :
?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum ->
f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map :
'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t ->
Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove :
'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b ->
f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
end
module Edge :
sig
type t = edge
type node = node
type graph = t
type label = string
val create : node -> node -> label -> t
val label : t -> label
val src : t -> node
val dst : t -> node
val mem : t -> graph -> bool
val insert : t -> graph -> graph
val update : t -> label -> graph -> graph
val remove : t -> graph -> graph
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list ->
'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi :
(Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list ->
f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array ->
'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t ->
key:Key.t -> data:'a -> 'a list t
val change :
'a t ->
Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t ->
f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t ->
f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key :
'a t -> Key.t -> (Key.t * 'a) option
val next_key :
'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) ->
Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) ->
'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare :
('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find :
t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf :
t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
Elt.t array -> t
val stable_dedup_list :
Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable :
t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) ->
'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one :
('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ ->
data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ ->
key:'a key_ -> data:'b -> unit
val remove_multi :
('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ ->
f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ ->
'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals :
('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr :
?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum ->
f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map :
'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t ->
Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove :
'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b ->
f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
end
val empty : t
val nodes : t -> node seq
val edges : t -> edge seq
val is_directed : bool
val number_of_edges : t -> int
val number_of_nodes : t -> int
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness) Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a | `Right of 'a | `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map : t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable : t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) -> 'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) -> 'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one : ('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set : ('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ -> key:'a key_ -> data:'b -> unit
val remove_multi : ('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ -> f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ -> 'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals : ('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr : ?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum -> f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map : 'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t -> Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove : 'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b -> f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
val to_string : t -> string
val str : unit -> t -> string
val pps : unit -> t -> string
val ppo : out_channel -> t -> unit
val pp_seq :
Format.formatter -> t Core_kernel.Std.Sequence.t -> unit
val pp : Format.formatter -> t -> unit
end
module Exp :
sig
type t
type node = node
type edge
module Node :
sig
type t = node
type graph = t
type label = node
type edge = edge
val create : label -> t
val label : t -> label
val mem : t -> graph -> bool
val succs : t -> graph -> t seq
val preds : t -> graph -> t seq
val inputs : t -> graph -> edge seq
val outputs : t -> graph -> edge seq
val degree : ?dir:[ `In | `Out ] -> t -> graph -> int
val insert : t -> graph -> graph
val update : t -> label -> graph -> graph
val remove : t -> graph -> graph
val has_edge : t -> t -> graph -> bool
val edge : t -> t -> graph -> edge option
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list ->
'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi :
(Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list ->
f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array ->
'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t ->
key:Key.t -> data:'a -> 'a list t
val change :
'a t ->
Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t ->
f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t ->
f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key :
'a t -> Key.t -> (Key.t * 'a) option
val next_key :
'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) ->
Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) ->
'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare :
('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find :
t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf :
t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
Elt.t array -> t
val stable_dedup_list :
Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable :
t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) ->
'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one :
('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ ->
data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ ->
key:'a key_ -> data:'b -> unit
val remove_multi :
('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ ->
f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ ->
'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals :
('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr :
?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum ->
f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map :
'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t ->
Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove :
'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b ->
f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
end
module Edge :
sig
type t = edge
type node = node
type graph = t
type label = exp
val create : node -> node -> label -> t
val label : t -> label
val src : t -> node
val dst : t -> node
val mem : t -> graph -> bool
val insert : t -> graph -> graph
val update : t -> label -> graph -> graph
val remove : t -> graph -> graph
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list ->
'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi :
(Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list ->
f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array ->
'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t ->
key:Key.t -> data:'a -> 'a list t
val change :
'a t ->
Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t ->
f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t ->
f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key :
'a t -> Key.t -> (Key.t * 'a) option
val next_key :
'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) ->
Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) ->
'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare :
('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find :
t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf :
t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
Elt.t array -> t
val stable_dedup_list :
Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable :
t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) ->
'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one :
('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ ->
data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ ->
key:'a key_ -> data:'b -> unit
val remove_multi :
('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ ->
f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ ->
'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals :
('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr :
?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum ->
f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map :
'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t ->
Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove :
'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b ->
f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
end
val empty : t
val nodes : t -> node seq
val edges : t -> edge seq
val is_directed : bool
val number_of_edges : t -> int
val number_of_nodes : t -> int
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness) Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a | `Right of 'a | `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map : t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable : t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) -> 'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) -> 'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one : ('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set : ('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ -> key:'a key_ -> data:'b -> unit
val remove_multi : ('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ -> f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ -> 'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals : ('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr : ?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum -> f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map : 'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t -> Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove : 'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b -> f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
val to_string : t -> string
val str : unit -> t -> string
val pps : unit -> t -> string
val ppo : out_channel -> t -> unit
val pp_seq :
Format.formatter -> t Core_kernel.Std.Sequence.t -> unit
val pp : Format.formatter -> t -> unit
end
module Stmt :
sig
type t
type node = node
type edge
module Node :
sig
type t = node
type graph = t
type label = node
type edge = edge
val create : label -> t
val label : t -> label
val mem : t -> graph -> bool
val succs : t -> graph -> t seq
val preds : t -> graph -> t seq
val inputs : t -> graph -> edge seq
val outputs : t -> graph -> edge seq
val degree : ?dir:[ `In | `Out ] -> t -> graph -> int
val insert : t -> graph -> graph
val update : t -> label -> graph -> graph
val remove : t -> graph -> graph
val has_edge : t -> t -> graph -> bool
val edge : t -> t -> graph -> edge option
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list ->
'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi :
(Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list ->
f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array ->
'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t ->
key:Key.t -> data:'a -> 'a list t
val change :
'a t ->
Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t ->
f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t ->
f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key :
'a t -> Key.t -> (Key.t * 'a) option
val next_key :
'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) ->
Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) ->
'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare :
('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find :
t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf :
t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
Elt.t array -> t
val stable_dedup_list :
Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable :
t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) ->
'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one :
('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ ->
data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ ->
key:'a key_ -> data:'b -> unit
val remove_multi :
('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ ->
f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ ->
'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals :
('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr :
?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum ->
f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map :
'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t ->
Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove :
'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b ->
f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
end
module Edge :
sig
type t = edge
type node = node
type graph = t
type label = stmt
val create : node -> node -> label -> t
val label : t -> label
val src : t -> node
val dst : t -> node
val mem : t -> graph -> bool
val insert : t -> graph -> graph
val update : t -> label -> graph -> graph
val remove : t -> graph -> graph
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list ->
'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi :
(Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list ->
f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array ->
'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t ->
key:Key.t -> data:'a -> 'a list t
val change :
'a t ->
Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t ->
f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t ->
f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key :
'a t -> Key.t -> (Key.t * 'a) option
val next_key :
'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) ->
Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) ->
'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare :
('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find :
t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf :
t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
Elt.t array -> t
val stable_dedup_list :
Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable :
t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) ->
'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one :
('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ ->
data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ ->
key:'a key_ -> data:'b -> unit
val remove_multi :
('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ ->
f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ ->
'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals :
('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr :
?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum ->
f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map :
'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t ->
Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove :
'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b ->
f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
end
val empty : t
val nodes : t -> node seq
val edges : t -> edge seq
val is_directed : bool
val number_of_edges : t -> int
val number_of_nodes : t -> int
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness) Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a | `Right of 'a | `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map : t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable : t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) -> 'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) -> 'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one : ('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set : ('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ -> key:'a key_ -> data:'b -> unit
val remove_multi : ('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ -> f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ -> 'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals : ('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr : ?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum -> f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map : 'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t -> Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove : 'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b -> f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
val to_string : t -> string
val str : unit -> t -> string
val pps : unit -> t -> string
val ppo : out_channel -> t -> unit
val pp_seq :
Format.formatter -> t Core_kernel.Std.Sequence.t -> unit
val pp : Format.formatter -> t -> unit
end
module Var :
sig
type t
type node = node
type edge
module Node :
sig
type t = node
type graph = t
type label = node
type edge = edge
val create : label -> t
val label : t -> label
val mem : t -> graph -> bool
val succs : t -> graph -> t seq
val preds : t -> graph -> t seq
val inputs : t -> graph -> edge seq
val outputs : t -> graph -> edge seq
val degree : ?dir:[ `In | `Out ] -> t -> graph -> int
val insert : t -> graph -> graph
val update : t -> label -> graph -> graph
val remove : t -> graph -> graph
val has_edge : t -> t -> graph -> bool
val edge : t -> t -> graph -> edge option
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list ->
'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi :
(Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list ->
f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array ->
'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t ->
key:Key.t -> data:'a -> 'a list t
val change :
'a t ->
Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t ->
f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t ->
f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key :
'a t -> Key.t -> (Key.t * 'a) option
val next_key :
'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) ->
Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) ->
'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare :
('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find :
t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf :
t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
Elt.t array -> t
val stable_dedup_list :
Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable :
t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) ->
'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one :
('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ ->
data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ ->
key:'a key_ -> data:'b -> unit
val remove_multi :
('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ ->
f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ ->
'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals :
('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr :
?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum ->
f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map :
'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t ->
Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove :
'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b ->
f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
end
module Edge :
sig
type t = edge
type node = node
type graph = t
type label = var
val create : node -> node -> label -> t
val label : t -> label
val src : t -> node
val dst : t -> node
val mem : t -> graph -> bool
val insert : t -> graph -> graph
val update : t -> label -> graph -> graph
val remove : t -> graph -> graph
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list ->
'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi :
(Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list ->
f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array ->
'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t ->
key:Key.t -> data:'a -> 'a list t
val change :
'a t ->
Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t ->
f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t ->
f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key :
'a t -> Key.t -> (Key.t * 'a) option
val next_key :
'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) ->
Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) ->
'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare :
('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find :
t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf :
t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
Elt.t array -> t
val stable_dedup_list :
Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable :
t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) ->
'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one :
('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ ->
data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ ->
key:'a key_ -> data:'b -> unit
val remove_multi :
('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ ->
f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ ->
'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals :
('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr :
?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum ->
f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map :
'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t ->
Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove :
'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b ->
f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
end
val empty : t
val nodes : t -> node seq
val edges : t -> edge seq
val is_directed : bool
val number_of_edges : t -> int
val number_of_nodes : t -> int
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness) Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a | `Right of 'a | `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map : t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable : t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) -> 'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) -> 'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one : ('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set : ('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ -> key:'a key_ -> data:'b -> unit
val remove_multi : ('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ -> f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ -> 'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals : ('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr : ?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum -> f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map : 'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t -> Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove : 'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b -> f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
val to_string : t -> string
val str : unit -> t -> string
val pps : unit -> t -> string
val ppo : out_channel -> t -> unit
val pp_seq :
Format.formatter -> t Core_kernel.Std.Sequence.t -> unit
val pp : Format.formatter -> t -> unit
end
module Tid :
sig
type t
type node = node
type edge
module Node :
sig
type t = node
type graph = t
type label = node
type edge = edge
val create : label -> t
val label : t -> label
val mem : t -> graph -> bool
val succs : t -> graph -> t seq
val preds : t -> graph -> t seq
val inputs : t -> graph -> edge seq
val outputs : t -> graph -> edge seq
val degree : ?dir:[ `In | `Out ] -> t -> graph -> int
val insert : t -> graph -> graph
val update : t -> label -> graph -> graph
val remove : t -> graph -> graph
val has_edge : t -> t -> graph -> bool
val edge : t -> t -> graph -> edge option
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list ->
'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi :
(Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list ->
f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array ->
'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t ->
key:Key.t -> data:'a -> 'a list t
val change :
'a t ->
Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t ->
f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t ->
f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key :
'a t -> Key.t -> (Key.t * 'a) option
val next_key :
'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) ->
Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) ->
'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare :
('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find :
t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf :
t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
Elt.t array -> t
val stable_dedup_list :
Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable :
t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) ->
'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one :
('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ ->
data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ ->
key:'a key_ -> data:'b -> unit
val remove_multi :
('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ ->
f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ ->
'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals :
('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr :
?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum ->
f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map :
'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t ->
Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove :
'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b ->
f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
end
module Edge :
sig
type t = edge
type node = node
type graph = t
type label = tid
val create : node -> node -> label -> t
val label : t -> label
val src : t -> node
val dst : t -> node
val mem : t -> graph -> bool
val insert : t -> graph -> graph
val update : t -> label -> graph -> graph
val remove : t -> graph -> graph
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list ->
'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi :
(Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list ->
f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array ->
'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t ->
key:Key.t -> data:'a -> 'a list t
val change :
'a t ->
Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t ->
f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t ->
f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key :
'a t -> Key.t -> (Key.t * 'a) option
val next_key :
'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) ->
Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) ->
'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare :
('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find :
t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf :
t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
Elt.t array -> t
val stable_dedup_list :
Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable :
t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) ->
'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one :
('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ ->
data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ ->
key:'a key_ -> data:'b -> unit
val remove_multi :
('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ ->
f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ ->
'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals :
('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr :
?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum ->
f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map :
'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t ->
Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove :
'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b ->
f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
end
val empty : t
val nodes : t -> node seq
val edges : t -> edge seq
val is_directed : bool
val number_of_edges : t -> int
val number_of_nodes : t -> int
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness) Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a | `Right of 'a | `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map : t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable : t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) -> 'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) -> 'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one : ('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set : ('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ -> key:'a key_ -> data:'b -> unit
val remove_multi : ('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ -> f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ -> 'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals : ('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr : ?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum -> f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map : 'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t -> Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove : 'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b -> f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
val to_string : t -> string
val str : unit -> t -> string
val pps : unit -> t -> string
val ppo : out_channel -> t -> unit
val pp_seq :
Format.formatter -> t Core_kernel.Std.Sequence.t -> unit
val pp : Format.formatter -> t -> unit
end
module Type :
sig
type t
type node = node
type edge
module Node :
sig
type t = node
type graph = t
type label = node
type edge = edge
val create : label -> t
val label : t -> label
val mem : t -> graph -> bool
val succs : t -> graph -> t seq
val preds : t -> graph -> t seq
val inputs : t -> graph -> edge seq
val outputs : t -> graph -> edge seq
val degree : ?dir:[ `In | `Out ] -> t -> graph -> int
val insert : t -> graph -> graph
val update : t -> label -> graph -> graph
val remove : t -> graph -> graph
val has_edge : t -> t -> graph -> bool
val edge : t -> t -> graph -> edge option
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list ->
'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi :
(Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list ->
f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array ->
'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t ->
key:Key.t -> data:'a -> 'a list t
val change :
'a t ->
Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t ->
f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t ->
f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key :
'a t -> Key.t -> (Key.t * 'a) option
val next_key :
'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) ->
Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) ->
'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare :
('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find :
t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf :
t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
Elt.t array -> t
val stable_dedup_list :
Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable :
t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) ->
'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one :
('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ ->
data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ ->
key:'a key_ -> data:'b -> unit
val remove_multi :
('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ ->
f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ ->
'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals :
('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr :
?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum ->
f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map :
'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t ->
Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove :
'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b ->
f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
end
module Edge :
sig
type t = edge
type node = node
type graph = t
type label = typ
val create : node -> node -> label -> t
val label : t -> label
val src : t -> node
val dst : t -> node
val mem : t -> graph -> bool
val insert : t -> graph -> graph
val update : t -> label -> graph -> graph
val remove : t -> graph -> graph
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list ->
'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi :
(Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list ->
f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array ->
'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t ->
key:Key.t -> data:'a -> 'a list t
val change :
'a t ->
Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t ->
f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t ->
f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key :
'a t -> Key.t -> (Key.t * 'a) option
val next_key :
'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) ->
Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) ->
'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare :
('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find :
t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf :
t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
Elt.t array -> t
val stable_dedup_list :
Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable :
t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) ->
'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one :
('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ ->
data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ ->
key:'a key_ -> data:'b -> unit
val remove_multi :
('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ ->
f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ ->
'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals :
('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr :
?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum ->
f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map :
'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t ->
Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove :
'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b ->
f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
end
val empty : t
val nodes : t -> node seq
val edges : t -> edge seq
val is_directed : bool
val number_of_edges : t -> int
val number_of_nodes : t -> int
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness) Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a | `Right of 'a | `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map : t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable : t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) -> 'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) -> 'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one : ('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set : ('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ -> key:'a key_ -> data:'b -> unit
val remove_multi : ('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ -> f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ -> 'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals : ('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr : ?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum -> f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map : 'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t -> Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove : 'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b -> f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
val to_string : t -> string
val str : unit -> t -> string
val pps : unit -> t -> string
val ppo : out_channel -> t -> unit
val pp_seq :
Format.formatter -> t Core_kernel.Std.Sequence.t -> unit
val pp : Format.formatter -> t -> unit
end
module Tree :
sig
type t = node tree
val to_string : t -> string
val str : unit -> t -> string
val pps : unit -> t -> string
val ppo : out_channel -> t -> unit
val pp_seq :
Format.formatter -> t Core_kernel.Std.Sequence.t -> unit
val pp : Format.formatter -> t -> unit
end
module Frontier :
sig
type t = node frontier
val to_string : t -> string
val str : unit -> t -> string
val pps : unit -> t -> string
val ppo : out_channel -> t -> unit
val pp_seq :
Format.formatter -> t Core_kernel.Std.Sequence.t -> unit
val pp : Format.formatter -> t -> unit
end
module Path :
sig
type t = node path
val to_string : t -> string
val str : unit -> t -> string
val pps : unit -> t -> string
val ppo : out_channel -> t -> unit
val pp_seq :
Format.formatter -> t Core_kernel.Std.Sequence.t -> unit
val pp : Format.formatter -> t -> unit
end
module Partition :
sig
type t = node partition
val to_string : t -> string
val str : unit -> t -> string
val pps : unit -> t -> string
val ppo : out_channel -> t -> unit
val pp_seq :
Format.formatter -> t Core_kernel.Std.Sequence.t -> unit
val pp : Format.formatter -> t -> unit
end
module Group :
sig
type t = node group
val to_string : t -> string
val str : unit -> t -> string
val pps : unit -> t -> string
val ppo : out_channel -> t -> unit
val pp_seq :
Format.formatter -> t Core_kernel.Std.Sequence.t -> unit
val pp : Format.formatter -> t -> unit
end
end
module Value :
sig
type node = value
module Bool :
sig
type t
type node = node
type edge
module Node :
sig
type t = node
type graph = t
type label = node
type edge = edge
val create : label -> t
val label : t -> label
val mem : t -> graph -> bool
val succs : t -> graph -> t seq
val preds : t -> graph -> t seq
val inputs : t -> graph -> edge seq
val outputs : t -> graph -> edge seq
val degree : ?dir:[ `In | `Out ] -> t -> graph -> int
val insert : t -> graph -> graph
val update : t -> label -> graph -> graph
val remove : t -> graph -> graph
val has_edge : t -> t -> graph -> bool
val edge : t -> t -> graph -> edge option
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list ->
'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi :
(Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list ->
f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array ->
'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t ->
key:Key.t -> data:'a -> 'a list t
val change :
'a t ->
Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t ->
f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t ->
f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key :
'a t -> Key.t -> (Key.t * 'a) option
val next_key :
'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) ->
Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) ->
'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare :
('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find :
t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf :
t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
Elt.t array -> t
val stable_dedup_list :
Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable :
t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) ->
'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one :
('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ ->
data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ ->
key:'a key_ -> data:'b -> unit
val remove_multi :
('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ ->
f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ ->
'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals :
('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr :
?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum ->
f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map :
'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t ->
Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove :
'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b ->
f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
end
module Edge :
sig
type t = edge
type node = node
type graph = t
type label = bool
val create : node -> node -> label -> t
val label : t -> label
val src : t -> node
val dst : t -> node
val mem : t -> graph -> bool
val insert : t -> graph -> graph
val update : t -> label -> graph -> graph
val remove : t -> graph -> graph
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list ->
'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi :
(Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list ->
f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array ->
'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t ->
key:Key.t -> data:'a -> 'a list t
val change :
'a t ->
Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t ->
f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t ->
f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key :
'a t -> Key.t -> (Key.t * 'a) option
val next_key :
'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) ->
Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) ->
'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare :
('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find :
t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf :
t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
Elt.t array -> t
val stable_dedup_list :
Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable :
t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) ->
'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one :
('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ ->
data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ ->
key:'a key_ -> data:'b -> unit
val remove_multi :
('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ ->
f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ ->
'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals :
('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr :
?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum ->
f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map :
'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t ->
Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove :
'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b ->
f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
end
val empty : t
val nodes : t -> node seq
val edges : t -> edge seq
val is_directed : bool
val number_of_edges : t -> int
val number_of_nodes : t -> int
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness) Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a | `Right of 'a | `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map : t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable : t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) -> 'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) -> 'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one : ('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set : ('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ -> key:'a key_ -> data:'b -> unit
val remove_multi : ('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ -> f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ -> 'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals : ('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr : ?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum -> f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map : 'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t -> Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove : 'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b -> f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
val to_string : t -> string
val str : unit -> t -> string
val pps : unit -> t -> string
val ppo : out_channel -> t -> unit
val pp_seq :
Format.formatter -> t Core_kernel.Std.Sequence.t -> unit
val pp : Format.formatter -> t -> unit
end
module Unit :
sig
type t
type node = node
type edge
module Node :
sig
type t = node
type graph = t
type label = node
type edge = edge
val create : label -> t
val label : t -> label
val mem : t -> graph -> bool
val succs : t -> graph -> t seq
val preds : t -> graph -> t seq
val inputs : t -> graph -> edge seq
val outputs : t -> graph -> edge seq
val degree : ?dir:[ `In | `Out ] -> t -> graph -> int
val insert : t -> graph -> graph
val update : t -> label -> graph -> graph
val remove : t -> graph -> graph
val has_edge : t -> t -> graph -> bool
val edge : t -> t -> graph -> edge option
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list ->
'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi :
(Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list ->
f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array ->
'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t ->
key:Key.t -> data:'a -> 'a list t
val change :
'a t ->
Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t ->
f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t ->
f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key :
'a t -> Key.t -> (Key.t * 'a) option
val next_key :
'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) ->
Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) ->
'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare :
('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find :
t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf :
t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
Elt.t array -> t
val stable_dedup_list :
Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable :
t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) ->
'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one :
('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ ->
data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ ->
key:'a key_ -> data:'b -> unit
val remove_multi :
('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ ->
f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ ->
'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals :
('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr :
?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum ->
f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map :
'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t ->
Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove :
'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b ->
f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
end
module Edge :
sig
type t = edge
type node = node
type graph = t
type label = unit
val create : node -> node -> label -> t
val label : t -> label
val src : t -> node
val dst : t -> node
val mem : t -> graph -> bool
val insert : t -> graph -> graph
val update : t -> label -> graph -> graph
val remove : t -> graph -> graph
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list ->
'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi :
(Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list ->
f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array ->
'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t ->
key:Key.t -> data:'a -> 'a list t
val change :
'a t ->
Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t ->
f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t ->
f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key :
'a t -> Key.t -> (Key.t * 'a) option
val next_key :
'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) ->
Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) ->
'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare :
('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find :
t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf :
t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
Elt.t array -> t
val stable_dedup_list :
Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable :
t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) ->
'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one :
('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ ->
data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ ->
key:'a key_ -> data:'b -> unit
val remove_multi :
('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ ->
f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ ->
'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals :
('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr :
?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum ->
f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map :
'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t ->
Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove :
'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b ->
f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
end
val empty : t
val nodes : t -> node seq
val edges : t -> edge seq
val is_directed : bool
val number_of_edges : t -> int
val number_of_nodes : t -> int
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness) Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a | `Right of 'a | `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map : t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable : t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) -> 'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) -> 'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one : ('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set : ('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ -> key:'a key_ -> data:'b -> unit
val remove_multi : ('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ -> f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ -> 'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals : ('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr : ?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum -> f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map : 'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t -> Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove : 'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b -> f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
val to_string : t -> string
val str : unit -> t -> string
val pps : unit -> t -> string
val ppo : out_channel -> t -> unit
val pp_seq :
Format.formatter -> t Core_kernel.Std.Sequence.t -> unit
val pp : Format.formatter -> t -> unit
end
module Value :
sig
type t
type node = node
type edge
module Node :
sig
type t = node
type graph = t
type label = node
type edge = edge
val create : label -> t
val label : t -> label
val mem : t -> graph -> bool
val succs : t -> graph -> t seq
val preds : t -> graph -> t seq
val inputs : t -> graph -> edge seq
val outputs : t -> graph -> edge seq
val degree : ?dir:[ `In | `Out ] -> t -> graph -> int
val insert : t -> graph -> graph
val update : t -> label -> graph -> graph
val remove : t -> graph -> graph
val has_edge : t -> t -> graph -> bool
val edge : t -> t -> graph -> edge option
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list ->
'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi :
(Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list ->
f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array ->
'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t ->
key:Key.t -> data:'a -> 'a list t
val change :
'a t ->
Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t ->
f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t ->
f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key :
'a t -> Key.t -> (Key.t * 'a) option
val next_key :
'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) ->
Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) ->
'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare :
('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find :
t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf :
t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
Elt.t array -> t
val stable_dedup_list :
Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable :
t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) ->
'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one :
('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ ->
data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ ->
key:'a key_ -> data:'b -> unit
val remove_multi :
('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ ->
f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ ->
'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals :
('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr :
?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum ->
f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map :
'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t ->
Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove :
'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b ->
f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
end
module Edge :
sig
type t = edge
type node = node
type graph = t
type label = value
val create : node -> node -> label -> t
val label : t -> label
val src : t -> node
val dst : t -> node
val mem : t -> graph -> bool
val insert : t -> graph -> graph
val update : t -> label -> graph -> graph
val remove : t -> graph -> graph
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list ->
'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi :
(Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list ->
f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array ->
'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t ->
key:Key.t -> data:'a -> 'a list t
val change :
'a t ->
Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t ->
f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t ->
f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key :
'a t -> Key.t -> (Key.t * 'a) option
val next_key :
'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) ->
Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) ->
'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare :
('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find :
t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf :
t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
Elt.t array -> t
val stable_dedup_list :
Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable :
t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) ->
'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one :
('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ ->
data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ ->
key:'a key_ -> data:'b -> unit
val remove_multi :
('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ ->
f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ ->
'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals :
('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr :
?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum ->
f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map :
'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t ->
Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove :
'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b ->
f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
end
val empty : t
val nodes : t -> node seq
val edges : t -> edge seq
val is_directed : bool
val number_of_edges : t -> int
val number_of_nodes : t -> int
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness) Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a | `Right of 'a | `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map : t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable : t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) -> 'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) -> 'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one : ('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set : ('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ -> key:'a key_ -> data:'b -> unit
val remove_multi : ('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ -> f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ -> 'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals : ('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr : ?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum -> f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map : 'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t -> Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove : 'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b -> f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
val to_string : t -> string
val str : unit -> t -> string
val pps : unit -> t -> string
val ppo : out_channel -> t -> unit
val pp_seq :
Format.formatter -> t Core_kernel.Std.Sequence.t -> unit
val pp : Format.formatter -> t -> unit
end
module Word :
sig
type t
type node = node
type edge
module Node :
sig
type t = node
type graph = t
type label = node
type edge = edge
val create : label -> t
val label : t -> label
val mem : t -> graph -> bool
val succs : t -> graph -> t seq
val preds : t -> graph -> t seq
val inputs : t -> graph -> edge seq
val outputs : t -> graph -> edge seq
val degree : ?dir:[ `In | `Out ] -> t -> graph -> int
val insert : t -> graph -> graph
val update : t -> label -> graph -> graph
val remove : t -> graph -> graph
val has_edge : t -> t -> graph -> bool
val edge : t -> t -> graph -> edge option
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list ->
'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi :
(Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list ->
f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array ->
'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t ->
key:Key.t -> data:'a -> 'a list t
val change :
'a t ->
Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t ->
f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t ->
f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key :
'a t -> Key.t -> (Key.t * 'a) option
val next_key :
'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) ->
Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) ->
'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare :
('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find :
t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf :
t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
Elt.t array -> t
val stable_dedup_list :
Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable :
t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) ->
'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one :
('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ ->
data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ ->
key:'a key_ -> data:'b -> unit
val remove_multi :
('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ ->
f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ ->
'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals :
('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr :
?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum ->
f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map :
'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t ->
Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove :
'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b ->
f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
end
module Edge :
sig
type t = edge
type node = node
type graph = t
type label = word
val create : node -> node -> label -> t
val label : t -> label
val src : t -> node
val dst : t -> node
val mem : t -> graph -> bool
val insert : t -> graph -> graph
val update : t -> label -> graph -> graph
val remove : t -> graph -> graph
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list ->
'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi :
(Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list ->
f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array ->
'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t ->
key:Key.t -> data:'a -> 'a list t
val change :
'a t ->
Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t ->
f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t ->
f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key :
'a t -> Key.t -> (Key.t * 'a) option
val next_key :
'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) ->
Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) ->
'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare :
('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find :
t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf :
t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
Elt.t array -> t
val stable_dedup_list :
Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable :
t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) ->
'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one :
('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ ->
data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ ->
key:'a key_ -> data:'b -> unit
val remove_multi :
('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ ->
f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ ->
'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals :
('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr :
?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum ->
f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map :
'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t ->
Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove :
'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b ->
f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
end
val empty : t
val nodes : t -> node seq
val edges : t -> edge seq
val is_directed : bool
val number_of_edges : t -> int
val number_of_nodes : t -> int
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness) Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a | `Right of 'a | `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map : t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable : t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) -> 'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) -> 'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one : ('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set : ('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ -> key:'a key_ -> data:'b -> unit
val remove_multi : ('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ -> f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ -> 'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals : ('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr : ?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum -> f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map : 'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t -> Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove : 'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b -> f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
val to_string : t -> string
val str : unit -> t -> string
val pps : unit -> t -> string
val ppo : out_channel -> t -> unit
val pp_seq :
Format.formatter -> t Core_kernel.Std.Sequence.t -> unit
val pp : Format.formatter -> t -> unit
end
module Int :
sig
type t
type node = node
type edge
module Node :
sig
type t = node
type graph = t
type label = node
type edge = edge
val create : label -> t
val label : t -> label
val mem : t -> graph -> bool
val succs : t -> graph -> t seq
val preds : t -> graph -> t seq
val inputs : t -> graph -> edge seq
val outputs : t -> graph -> edge seq
val degree : ?dir:[ `In | `Out ] -> t -> graph -> int
val insert : t -> graph -> graph
val update : t -> label -> graph -> graph
val remove : t -> graph -> graph
val has_edge : t -> t -> graph -> bool
val edge : t -> t -> graph -> edge option
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list ->
'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi :
(Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list ->
f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array ->
'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t ->
key:Key.t -> data:'a -> 'a list t
val change :
'a t ->
Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t ->
f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t ->
f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key :
'a t -> Key.t -> (Key.t * 'a) option
val next_key :
'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) ->
Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) ->
'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare :
('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find :
t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf :
t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
Elt.t array -> t
val stable_dedup_list :
Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable :
t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) ->
'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one :
('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ ->
data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ ->
key:'a key_ -> data:'b -> unit
val remove_multi :
('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ ->
f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ ->
'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals :
('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr :
?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum ->
f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map :
'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t ->
Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove :
'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b ->
f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
end
module Edge :
sig
type t = edge
type node = node
type graph = t
type label = int
val create : node -> node -> label -> t
val label : t -> label
val src : t -> node
val dst : t -> node
val mem : t -> graph -> bool
val insert : t -> graph -> graph
val update : t -> label -> graph -> graph
val remove : t -> graph -> graph
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list ->
'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi :
(Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list ->
f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array ->
'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t ->
key:Key.t -> data:'a -> 'a list t
val change :
'a t ->
Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t ->
f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t ->
f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key :
'a t -> Key.t -> (Key.t * 'a) option
val next_key :
'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) ->
Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) ->
'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare :
('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find :
t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf :
t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
Elt.t array -> t
val stable_dedup_list :
Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable :
t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) ->
'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one :
('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ ->
data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ ->
key:'a key_ -> data:'b -> unit
val remove_multi :
('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ ->
f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ ->
'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals :
('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr :
?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum ->
f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map :
'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t ->
Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove :
'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b ->
f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
end
val empty : t
val nodes : t -> node seq
val edges : t -> edge seq
val is_directed : bool
val number_of_edges : t -> int
val number_of_nodes : t -> int
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness) Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a | `Right of 'a | `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map : t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable : t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) -> 'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) -> 'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one : ('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set : ('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ -> key:'a key_ -> data:'b -> unit
val remove_multi : ('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ -> f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ -> 'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals : ('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr : ?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum -> f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map : 'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t -> Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove : 'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b -> f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
val to_string : t -> string
val str : unit -> t -> string
val pps : unit -> t -> string
val ppo : out_channel -> t -> unit
val pp_seq :
Format.formatter -> t Core_kernel.Std.Sequence.t -> unit
val pp : Format.formatter -> t -> unit
end
module String :
sig
type t
type node = node
type edge
module Node :
sig
type t = node
type graph = t
type label = node
type edge = edge
val create : label -> t
val label : t -> label
val mem : t -> graph -> bool
val succs : t -> graph -> t seq
val preds : t -> graph -> t seq
val inputs : t -> graph -> edge seq
val outputs : t -> graph -> edge seq
val degree : ?dir:[ `In | `Out ] -> t -> graph -> int
val insert : t -> graph -> graph
val update : t -> label -> graph -> graph
val remove : t -> graph -> graph
val has_edge : t -> t -> graph -> bool
val edge : t -> t -> graph -> edge option
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list ->
'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi :
(Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list ->
f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array ->
'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t ->
key:Key.t -> data:'a -> 'a list t
val change :
'a t ->
Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t ->
f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t ->
f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key :
'a t -> Key.t -> (Key.t * 'a) option
val next_key :
'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) ->
Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) ->
'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare :
('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find :
t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf :
t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
Elt.t array -> t
val stable_dedup_list :
Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable :
t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) ->
'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one :
('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ ->
data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ ->
key:'a key_ -> data:'b -> unit
val remove_multi :
('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ ->
f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ ->
'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals :
('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr :
?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum ->
f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map :
'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t ->
Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove :
'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b ->
f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
end
module Edge :
sig
type t = edge
type node = node
type graph = t
type label = string
val create : node -> node -> label -> t
val label : t -> label
val src : t -> node
val dst : t -> node
val mem : t -> graph -> bool
val insert : t -> graph -> graph
val update : t -> label -> graph -> graph
val remove : t -> graph -> graph
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list ->
'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi :
(Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list ->
f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array ->
'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t ->
key:Key.t -> data:'a -> 'a list t
val change :
'a t ->
Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t ->
f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t ->
f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key :
'a t -> Key.t -> (Key.t * 'a) option
val next_key :
'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) ->
Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) ->
'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare :
('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find :
t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf :
t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
Elt.t array -> t
val stable_dedup_list :
Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable :
t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) ->
'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one :
('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ ->
data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ ->
key:'a key_ -> data:'b -> unit
val remove_multi :
('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ ->
f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ ->
'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals :
('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr :
?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum ->
f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map :
'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t ->
Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove :
'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b ->
f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
end
val empty : t
val nodes : t -> node seq
val edges : t -> edge seq
val is_directed : bool
val number_of_edges : t -> int
val number_of_nodes : t -> int
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness) Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a | `Right of 'a | `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map : t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable : t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) -> 'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) -> 'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one : ('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set : ('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ -> key:'a key_ -> data:'b -> unit
val remove_multi : ('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ -> f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ -> 'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals : ('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr : ?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum -> f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map : 'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t -> Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove : 'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b -> f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
val to_string : t -> string
val str : unit -> t -> string
val pps : unit -> t -> string
val ppo : out_channel -> t -> unit
val pp_seq :
Format.formatter -> t Core_kernel.Std.Sequence.t -> unit
val pp : Format.formatter -> t -> unit
end
module Exp :
sig
type t
type node = node
type edge
module Node :
sig
type t = node
type graph = t
type label = node
type edge = edge
val create : label -> t
val label : t -> label
val mem : t -> graph -> bool
val succs : t -> graph -> t seq
val preds : t -> graph -> t seq
val inputs : t -> graph -> edge seq
val outputs : t -> graph -> edge seq
val degree : ?dir:[ `In | `Out ] -> t -> graph -> int
val insert : t -> graph -> graph
val update : t -> label -> graph -> graph
val remove : t -> graph -> graph
val has_edge : t -> t -> graph -> bool
val edge : t -> t -> graph -> edge option
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list ->
'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi :
(Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list ->
f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array ->
'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t ->
key:Key.t -> data:'a -> 'a list t
val change :
'a t ->
Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t ->
f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t ->
f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key :
'a t -> Key.t -> (Key.t * 'a) option
val next_key :
'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) ->
Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) ->
'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare :
('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find :
t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf :
t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
Elt.t array -> t
val stable_dedup_list :
Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable :
t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) ->
'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one :
('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ ->
data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ ->
key:'a key_ -> data:'b -> unit
val remove_multi :
('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ ->
f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ ->
'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals :
('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr :
?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum ->
f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map :
'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t ->
Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove :
'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b ->
f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
end
module Edge :
sig
type t = edge
type node = node
type graph = t
type label = exp
val create : node -> node -> label -> t
val label : t -> label
val src : t -> node
val dst : t -> node
val mem : t -> graph -> bool
val insert : t -> graph -> graph
val update : t -> label -> graph -> graph
val remove : t -> graph -> graph
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list ->
'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi :
(Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list ->
f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array ->
'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t ->
key:Key.t -> data:'a -> 'a list t
val change :
'a t ->
Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t ->
f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t ->
f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key :
'a t -> Key.t -> (Key.t * 'a) option
val next_key :
'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) ->
Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) ->
'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare :
('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find :
t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf :
t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
Elt.t array -> t
val stable_dedup_list :
Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable :
t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) ->
'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one :
('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ ->
data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ ->
key:'a key_ -> data:'b -> unit
val remove_multi :
('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ ->
f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ ->
'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals :
('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr :
?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum ->
f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map :
'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t ->
Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove :
'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b ->
f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
end
val empty : t
val nodes : t -> node seq
val edges : t -> edge seq
val is_directed : bool
val number_of_edges : t -> int
val number_of_nodes : t -> int
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness) Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a | `Right of 'a | `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map : t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable : t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) -> 'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) -> 'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one : ('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set : ('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ -> key:'a key_ -> data:'b -> unit
val remove_multi : ('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ -> f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ -> 'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals : ('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr : ?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum -> f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map : 'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t -> Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove : 'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b -> f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
val to_string : t -> string
val str : unit -> t -> string
val pps : unit -> t -> string
val ppo : out_channel -> t -> unit
val pp_seq :
Format.formatter -> t Core_kernel.Std.Sequence.t -> unit
val pp : Format.formatter -> t -> unit
end
module Stmt :
sig
type t
type node = node
type edge
module Node :
sig
type t = node
type graph = t
type label = node
type edge = edge
val create : label -> t
val label : t -> label
val mem : t -> graph -> bool
val succs : t -> graph -> t seq
val preds : t -> graph -> t seq
val inputs : t -> graph -> edge seq
val outputs : t -> graph -> edge seq
val degree : ?dir:[ `In | `Out ] -> t -> graph -> int
val insert : t -> graph -> graph
val update : t -> label -> graph -> graph
val remove : t -> graph -> graph
val has_edge : t -> t -> graph -> bool
val edge : t -> t -> graph -> edge option
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list ->
'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi :
(Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list ->
f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array ->
'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t ->
key:Key.t -> data:'a -> 'a list t
val change :
'a t ->
Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t ->
f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t ->
f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key :
'a t -> Key.t -> (Key.t * 'a) option
val next_key :
'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) ->
Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) ->
'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare :
('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find :
t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf :
t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
Elt.t array -> t
val stable_dedup_list :
Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable :
t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) ->
'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one :
('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ ->
data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ ->
key:'a key_ -> data:'b -> unit
val remove_multi :
('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ ->
f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ ->
'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals :
('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr :
?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum ->
f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map :
'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t ->
Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove :
'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b ->
f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
end
module Edge :
sig
type t = edge
type node = node
type graph = t
type label = stmt
val create : node -> node -> label -> t
val label : t -> label
val src : t -> node
val dst : t -> node
val mem : t -> graph -> bool
val insert : t -> graph -> graph
val update : t -> label -> graph -> graph
val remove : t -> graph -> graph
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list ->
'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi :
(Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list ->
f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array ->
'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t ->
key:Key.t -> data:'a -> 'a list t
val change :
'a t ->
Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t ->
f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t ->
f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key :
'a t -> Key.t -> (Key.t * 'a) option
val next_key :
'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) ->
Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) ->
'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare :
('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find :
t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf :
t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
Elt.t array -> t
val stable_dedup_list :
Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable :
t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) ->
'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one :
('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ ->
data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ ->
key:'a key_ -> data:'b -> unit
val remove_multi :
('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ ->
f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ ->
'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals :
('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr :
?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum ->
f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map :
'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t ->
Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove :
'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b ->
f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
end
val empty : t
val nodes : t -> node seq
val edges : t -> edge seq
val is_directed : bool
val number_of_edges : t -> int
val number_of_nodes : t -> int
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness) Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a | `Right of 'a | `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map : t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable : t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) -> 'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) -> 'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one : ('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set : ('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ -> key:'a key_ -> data:'b -> unit
val remove_multi : ('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ -> f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ -> 'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals : ('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr : ?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum -> f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map : 'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t -> Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove : 'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b -> f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
val to_string : t -> string
val str : unit -> t -> string
val pps : unit -> t -> string
val ppo : out_channel -> t -> unit
val pp_seq :
Format.formatter -> t Core_kernel.Std.Sequence.t -> unit
val pp : Format.formatter -> t -> unit
end
module Var :
sig
type t
type node = node
type edge
module Node :
sig
type t = node
type graph = t
type label = node
type edge = edge
val create : label -> t
val label : t -> label
val mem : t -> graph -> bool
val succs : t -> graph -> t seq
val preds : t -> graph -> t seq
val inputs : t -> graph -> edge seq
val outputs : t -> graph -> edge seq
val degree : ?dir:[ `In | `Out ] -> t -> graph -> int
val insert : t -> graph -> graph
val update : t -> label -> graph -> graph
val remove : t -> graph -> graph
val has_edge : t -> t -> graph -> bool
val edge : t -> t -> graph -> edge option
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list ->
'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi :
(Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list ->
f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array ->
'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t ->
key:Key.t -> data:'a -> 'a list t
val change :
'a t ->
Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t ->
f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t ->
f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key :
'a t -> Key.t -> (Key.t * 'a) option
val next_key :
'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) ->
Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) ->
'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare :
('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find :
t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf :
t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
Elt.t array -> t
val stable_dedup_list :
Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable :
t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) ->
'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one :
('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ ->
data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ ->
key:'a key_ -> data:'b -> unit
val remove_multi :
('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ ->
f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ ->
'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals :
('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr :
?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum ->
f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map :
'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t ->
Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove :
'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b ->
f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
end
module Edge :
sig
type t = edge
type node = node
type graph = t
type label = var
val create : node -> node -> label -> t
val label : t -> label
val src : t -> node
val dst : t -> node
val mem : t -> graph -> bool
val insert : t -> graph -> graph
val update : t -> label -> graph -> graph
val remove : t -> graph -> graph
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list ->
'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi :
(Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list ->
f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array ->
'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t ->
key:Key.t -> data:'a -> 'a list t
val change :
'a t ->
Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t ->
f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t ->
f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key :
'a t -> Key.t -> (Key.t * 'a) option
val next_key :
'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) ->
Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) ->
'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare :
('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find :
t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf :
t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
Elt.t array -> t
val stable_dedup_list :
Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable :
t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) ->
'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one :
('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ ->
data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ ->
key:'a key_ -> data:'b -> unit
val remove_multi :
('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ ->
f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ ->
'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals :
('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr :
?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum ->
f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map :
'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t ->
Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove :
'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b ->
f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
end
val empty : t
val nodes : t -> node seq
val edges : t -> edge seq
val is_directed : bool
val number_of_edges : t -> int
val number_of_nodes : t -> int
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness) Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a | `Right of 'a | `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map : t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable : t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) -> 'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) -> 'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one : ('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set : ('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ -> key:'a key_ -> data:'b -> unit
val remove_multi : ('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ -> f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ -> 'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals : ('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr : ?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum -> f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map : 'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t -> Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove : 'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b -> f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
val to_string : t -> string
val str : unit -> t -> string
val pps : unit -> t -> string
val ppo : out_channel -> t -> unit
val pp_seq :
Format.formatter -> t Core_kernel.Std.Sequence.t -> unit
val pp : Format.formatter -> t -> unit
end
module Tid :
sig
type t
type node = node
type edge
module Node :
sig
type t = node
type graph = t
type label = node
type edge = edge
val create : label -> t
val label : t -> label
val mem : t -> graph -> bool
val succs : t -> graph -> t seq
val preds : t -> graph -> t seq
val inputs : t -> graph -> edge seq
val outputs : t -> graph -> edge seq
val degree : ?dir:[ `In | `Out ] -> t -> graph -> int
val insert : t -> graph -> graph
val update : t -> label -> graph -> graph
val remove : t -> graph -> graph
val has_edge : t -> t -> graph -> bool
val edge : t -> t -> graph -> edge option
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list ->
'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi :
(Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list ->
f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array ->
'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t ->
key:Key.t -> data:'a -> 'a list t
val change :
'a t ->
Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t ->
f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t ->
f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key :
'a t -> Key.t -> (Key.t * 'a) option
val next_key :
'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) ->
Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) ->
'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare :
('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find :
t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf :
t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
Elt.t array -> t
val stable_dedup_list :
Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable :
t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) ->
'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one :
('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ ->
data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ ->
key:'a key_ -> data:'b -> unit
val remove_multi :
('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ ->
f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ ->
'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals :
('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr :
?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum ->
f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map :
'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t ->
Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove :
'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b ->
f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
end
module Edge :
sig
type t = edge
type node = node
type graph = t
type label = tid
val create : node -> node -> label -> t
val label : t -> label
val src : t -> node
val dst : t -> node
val mem : t -> graph -> bool
val insert : t -> graph -> graph
val update : t -> label -> graph -> graph
val remove : t -> graph -> graph
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list ->
'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi :
(Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list ->
f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array ->
'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t ->
key:Key.t -> data:'a -> 'a list t
val change :
'a t ->
Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t ->
f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t ->
f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key :
'a t -> Key.t -> (Key.t * 'a) option
val next_key :
'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) ->
Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) ->
'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare :
('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find :
t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf :
t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
Elt.t array -> t
val stable_dedup_list :
Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable :
t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) ->
'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one :
('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ ->
data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ ->
key:'a key_ -> data:'b -> unit
val remove_multi :
('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ ->
f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ ->
'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals :
('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr :
?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum ->
f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map :
'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t ->
Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove :
'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b ->
f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
end
val empty : t
val nodes : t -> node seq
val edges : t -> edge seq
val is_directed : bool
val number_of_edges : t -> int
val number_of_nodes : t -> int
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness) Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a | `Right of 'a | `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map : t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable : t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) -> 'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) -> 'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one : ('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set : ('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ -> key:'a key_ -> data:'b -> unit
val remove_multi : ('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ -> f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ -> 'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals : ('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr : ?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum -> f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map : 'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t -> Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove : 'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b -> f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
val to_string : t -> string
val str : unit -> t -> string
val pps : unit -> t -> string
val ppo : out_channel -> t -> unit
val pp_seq :
Format.formatter -> t Core_kernel.Std.Sequence.t -> unit
val pp : Format.formatter -> t -> unit
end
module Type :
sig
type t
type node = node
type edge
module Node :
sig
type t = node
type graph = t
type label = node
type edge = edge
val create : label -> t
val label : t -> label
val mem : t -> graph -> bool
val succs : t -> graph -> t seq
val preds : t -> graph -> t seq
val inputs : t -> graph -> edge seq
val outputs : t -> graph -> edge seq
val degree : ?dir:[ `In | `Out ] -> t -> graph -> int
val insert : t -> graph -> graph
val update : t -> label -> graph -> graph
val remove : t -> graph -> graph
val has_edge : t -> t -> graph -> bool
val edge : t -> t -> graph -> edge option
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list ->
'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi :
(Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list ->
f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array ->
'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t ->
key:Key.t -> data:'a -> 'a list t
val change :
'a t ->
Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t ->
f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t ->
f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key :
'a t -> Key.t -> (Key.t * 'a) option
val next_key :
'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) ->
Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) ->
'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare :
('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find :
t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf :
t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
Elt.t array -> t
val stable_dedup_list :
Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable :
t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) ->
'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one :
('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ ->
data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ ->
key:'a key_ -> data:'b -> unit
val remove_multi :
('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ ->
f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ ->
'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals :
('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr :
?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum ->
f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map :
'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t ->
Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove :
'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b ->
f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
end
module Edge :
sig
type t = edge
type node = node
type graph = t
type label = typ
val create : node -> node -> label -> t
val label : t -> label
val src : t -> node
val dst : t -> node
val mem : t -> graph -> bool
val insert : t -> graph -> graph
val update : t -> label -> graph -> graph
val remove : t -> graph -> graph
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list ->
'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi :
(Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list ->
f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array ->
'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t ->
key:Key.t -> data:'a -> 'a list t
val change :
'a t ->
Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t ->
f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t ->
f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key :
'a t -> Key.t -> (Key.t * 'a) option
val next_key :
'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) ->
Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) ->
'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare :
('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find :
t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf :
t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
Elt.t array -> t
val stable_dedup_list :
Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable :
t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) ->
'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one :
('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ ->
data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ ->
key:'a key_ -> data:'b -> unit
val remove_multi :
('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ ->
f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ ->
'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals :
('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr :
?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum ->
f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map :
'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t ->
Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove :
'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b ->
f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
end
val empty : t
val nodes : t -> node seq
val edges : t -> edge seq
val is_directed : bool
val number_of_edges : t -> int
val number_of_nodes : t -> int
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness) Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a | `Right of 'a | `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map : t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable : t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) -> 'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) -> 'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one : ('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set : ('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ -> key:'a key_ -> data:'b -> unit
val remove_multi : ('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ -> f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ -> 'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals : ('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr : ?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum -> f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map : 'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t -> Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove : 'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b -> f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
val to_string : t -> string
val str : unit -> t -> string
val pps : unit -> t -> string
val ppo : out_channel -> t -> unit
val pp_seq :
Format.formatter -> t Core_kernel.Std.Sequence.t -> unit
val pp : Format.formatter -> t -> unit
end
module Tree :
sig
type t = node tree
val to_string : t -> string
val str : unit -> t -> string
val pps : unit -> t -> string
val ppo : out_channel -> t -> unit
val pp_seq :
Format.formatter -> t Core_kernel.Std.Sequence.t -> unit
val pp : Format.formatter -> t -> unit
end
module Frontier :
sig
type t = node frontier
val to_string : t -> string
val str : unit -> t -> string
val pps : unit -> t -> string
val ppo : out_channel -> t -> unit
val pp_seq :
Format.formatter -> t Core_kernel.Std.Sequence.t -> unit
val pp : Format.formatter -> t -> unit
end
module Path :
sig
type t = node path
val to_string : t -> string
val str : unit -> t -> string
val pps : unit -> t -> string
val ppo : out_channel -> t -> unit
val pp_seq :
Format.formatter -> t Core_kernel.Std.Sequence.t -> unit
val pp : Format.formatter -> t -> unit
end
module Partition :
sig
type t = node partition
val to_string : t -> string
val str : unit -> t -> string
val pps : unit -> t -> string
val ppo : out_channel -> t -> unit
val pp_seq :
Format.formatter -> t Core_kernel.Std.Sequence.t -> unit
val pp : Format.formatter -> t -> unit
end
module Group :
sig
type t = node group
val to_string : t -> string
val str : unit -> t -> string
val pps : unit -> t -> string
val ppo : out_channel -> t -> unit
val pp_seq :
Format.formatter -> t Core_kernel.Std.Sequence.t -> unit
val pp : Format.formatter -> t -> unit
end
end
module String :
sig
type node = string
module Bool :
sig
type t
type node = node
type edge
module Node :
sig
type t = node
type graph = t
type label = node
type edge = edge
val create : label -> t
val label : t -> label
val mem : t -> graph -> bool
val succs : t -> graph -> t seq
val preds : t -> graph -> t seq
val inputs : t -> graph -> edge seq
val outputs : t -> graph -> edge seq
val degree : ?dir:[ `In | `Out ] -> t -> graph -> int
val insert : t -> graph -> graph
val update : t -> label -> graph -> graph
val remove : t -> graph -> graph
val has_edge : t -> t -> graph -> bool
val edge : t -> t -> graph -> edge option
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list ->
'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi :
(Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list ->
f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array ->
'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t ->
key:Key.t -> data:'a -> 'a list t
val change :
'a t ->
Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t ->
f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t ->
f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key :
'a t -> Key.t -> (Key.t * 'a) option
val next_key :
'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) ->
Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) ->
'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare :
('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find :
t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf :
t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
Elt.t array -> t
val stable_dedup_list :
Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable :
t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) ->
'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one :
('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ ->
data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ ->
key:'a key_ -> data:'b -> unit
val remove_multi :
('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ ->
f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ ->
'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals :
('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr :
?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum ->
f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map :
'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t ->
Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove :
'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b ->
f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
end
module Edge :
sig
type t = edge
type node = node
type graph = t
type label = bool
val create : node -> node -> label -> t
val label : t -> label
val src : t -> node
val dst : t -> node
val mem : t -> graph -> bool
val insert : t -> graph -> graph
val update : t -> label -> graph -> graph
val remove : t -> graph -> graph
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list ->
'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi :
(Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list ->
f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array ->
'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t ->
key:Key.t -> data:'a -> 'a list t
val change :
'a t ->
Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t ->
f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t ->
f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key :
'a t -> Key.t -> (Key.t * 'a) option
val next_key :
'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) ->
Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) ->
'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare :
('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find :
t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf :
t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
Elt.t array -> t
val stable_dedup_list :
Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable :
t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) ->
'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one :
('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ ->
data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ ->
key:'a key_ -> data:'b -> unit
val remove_multi :
('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ ->
f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ ->
'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals :
('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr :
?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum ->
f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map :
'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t ->
Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove :
'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b ->
f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
end
val empty : t
val nodes : t -> node seq
val edges : t -> edge seq
val is_directed : bool
val number_of_edges : t -> int
val number_of_nodes : t -> int
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness) Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a | `Right of 'a | `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map : t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable : t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) -> 'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) -> 'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one : ('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set : ('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ -> key:'a key_ -> data:'b -> unit
val remove_multi : ('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ -> f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ -> 'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals : ('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr : ?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum -> f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map : 'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t -> Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove : 'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b -> f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
val to_string : t -> string
val str : unit -> t -> string
val pps : unit -> t -> string
val ppo : out_channel -> t -> unit
val pp_seq :
Format.formatter -> t Core_kernel.Std.Sequence.t -> unit
val pp : Format.formatter -> t -> unit
end
module Unit :
sig
type t
type node = node
type edge
module Node :
sig
type t = node
type graph = t
type label = node
type edge = edge
val create : label -> t
val label : t -> label
val mem : t -> graph -> bool
val succs : t -> graph -> t seq
val preds : t -> graph -> t seq
val inputs : t -> graph -> edge seq
val outputs : t -> graph -> edge seq
val degree : ?dir:[ `In | `Out ] -> t -> graph -> int
val insert : t -> graph -> graph
val update : t -> label -> graph -> graph
val remove : t -> graph -> graph
val has_edge : t -> t -> graph -> bool
val edge : t -> t -> graph -> edge option
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list ->
'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi :
(Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list ->
f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array ->
'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t ->
key:Key.t -> data:'a -> 'a list t
val change :
'a t ->
Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t ->
f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t ->
f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key :
'a t -> Key.t -> (Key.t * 'a) option
val next_key :
'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) ->
Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) ->
'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare :
('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find :
t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf :
t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
Elt.t array -> t
val stable_dedup_list :
Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable :
t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) ->
'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one :
('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ ->
data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ ->
key:'a key_ -> data:'b -> unit
val remove_multi :
('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ ->
f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ ->
'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals :
('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr :
?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum ->
f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map :
'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t ->
Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove :
'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b ->
f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
end
module Edge :
sig
type t = edge
type node = node
type graph = t
type label = unit
val create : node -> node -> label -> t
val label : t -> label
val src : t -> node
val dst : t -> node
val mem : t -> graph -> bool
val insert : t -> graph -> graph
val update : t -> label -> graph -> graph
val remove : t -> graph -> graph
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list ->
'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi :
(Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list ->
f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array ->
'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t ->
key:Key.t -> data:'a -> 'a list t
val change :
'a t ->
Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t ->
f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t ->
f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key :
'a t -> Key.t -> (Key.t * 'a) option
val next_key :
'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) ->
Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) ->
'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare :
('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find :
t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf :
t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
Elt.t array -> t
val stable_dedup_list :
Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable :
t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) ->
'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one :
('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ ->
data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ ->
key:'a key_ -> data:'b -> unit
val remove_multi :
('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ ->
f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ ->
'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals :
('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr :
?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum ->
f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map :
'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t ->
Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove :
'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b ->
f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
end
val empty : t
val nodes : t -> node seq
val edges : t -> edge seq
val is_directed : bool
val number_of_edges : t -> int
val number_of_nodes : t -> int
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness) Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a | `Right of 'a | `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map : t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable : t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) -> 'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) -> 'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one : ('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set : ('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ -> key:'a key_ -> data:'b -> unit
val remove_multi : ('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ -> f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ -> 'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals : ('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr : ?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum -> f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map : 'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t -> Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove : 'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b -> f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
val to_string : t -> string
val str : unit -> t -> string
val pps : unit -> t -> string
val ppo : out_channel -> t -> unit
val pp_seq :
Format.formatter -> t Core_kernel.Std.Sequence.t -> unit
val pp : Format.formatter -> t -> unit
end
module Value :
sig
type t
type node = node
type edge
module Node :
sig
type t = node
type graph = t
type label = node
type edge = edge
val create : label -> t
val label : t -> label
val mem : t -> graph -> bool
val succs : t -> graph -> t seq
val preds : t -> graph -> t seq
val inputs : t -> graph -> edge seq
val outputs : t -> graph -> edge seq
val degree : ?dir:[ `In | `Out ] -> t -> graph -> int
val insert : t -> graph -> graph
val update : t -> label -> graph -> graph
val remove : t -> graph -> graph
val has_edge : t -> t -> graph -> bool
val edge : t -> t -> graph -> edge option
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list ->
'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi :
(Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list ->
f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array ->
'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t ->
key:Key.t -> data:'a -> 'a list t
val change :
'a t ->
Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t ->
f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t ->
f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key :
'a t -> Key.t -> (Key.t * 'a) option
val next_key :
'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) ->
Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) ->
'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare :
('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find :
t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf :
t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
Elt.t array -> t
val stable_dedup_list :
Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable :
t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) ->
'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one :
('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ ->
data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ ->
key:'a key_ -> data:'b -> unit
val remove_multi :
('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ ->
f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ ->
'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals :
('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr :
?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum ->
f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map :
'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t ->
Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove :
'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b ->
f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
end
module Edge :
sig
type t = edge
type node = node
type graph = t
type label = value
val create : node -> node -> label -> t
val label : t -> label
val src : t -> node
val dst : t -> node
val mem : t -> graph -> bool
val insert : t -> graph -> graph
val update : t -> label -> graph -> graph
val remove : t -> graph -> graph
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list ->
'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi :
(Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list ->
f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array ->
'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t ->
key:Key.t -> data:'a -> 'a list t
val change :
'a t ->
Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t ->
f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t ->
f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key :
'a t -> Key.t -> (Key.t * 'a) option
val next_key :
'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) ->
Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) ->
'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare :
('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find :
t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf :
t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
Elt.t array -> t
val stable_dedup_list :
Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable :
t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) ->
'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one :
('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ ->
data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ ->
key:'a key_ -> data:'b -> unit
val remove_multi :
('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ ->
f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ ->
'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals :
('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr :
?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum ->
f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map :
'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t ->
Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove :
'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b ->
f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
end
val empty : t
val nodes : t -> node seq
val edges : t -> edge seq
val is_directed : bool
val number_of_edges : t -> int
val number_of_nodes : t -> int
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness) Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a | `Right of 'a | `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map : t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable : t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) -> 'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) -> 'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one : ('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set : ('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ -> key:'a key_ -> data:'b -> unit
val remove_multi : ('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ -> f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ -> 'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals : ('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr : ?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum -> f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map : 'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t -> Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove : 'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b -> f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
val to_string : t -> string
val str : unit -> t -> string
val pps : unit -> t -> string
val ppo : out_channel -> t -> unit
val pp_seq :
Format.formatter -> t Core_kernel.Std.Sequence.t -> unit
val pp : Format.formatter -> t -> unit
end
module Word :
sig
type t
type node = node
type edge
module Node :
sig
type t = node
type graph = t
type label = node
type edge = edge
val create : label -> t
val label : t -> label
val mem : t -> graph -> bool
val succs : t -> graph -> t seq
val preds : t -> graph -> t seq
val inputs : t -> graph -> edge seq
val outputs : t -> graph -> edge seq
val degree : ?dir:[ `In | `Out ] -> t -> graph -> int
val insert : t -> graph -> graph
val update : t -> label -> graph -> graph
val remove : t -> graph -> graph
val has_edge : t -> t -> graph -> bool
val edge : t -> t -> graph -> edge option
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list ->
'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi :
(Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list ->
f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array ->
'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t ->
key:Key.t -> data:'a -> 'a list t
val change :
'a t ->
Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t ->
f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t ->
f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key :
'a t -> Key.t -> (Key.t * 'a) option
val next_key :
'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) ->
Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) ->
'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare :
('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find :
t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf :
t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
Elt.t array -> t
val stable_dedup_list :
Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable :
t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) ->
'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one :
('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ ->
data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ ->
key:'a key_ -> data:'b -> unit
val remove_multi :
('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ ->
f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ ->
'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals :
('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr :
?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum ->
f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map :
'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t ->
Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove :
'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b ->
f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
end
module Edge :
sig
type t = edge
type node = node
type graph = t
type label = word
val create : node -> node -> label -> t
val label : t -> label
val src : t -> node
val dst : t -> node
val mem : t -> graph -> bool
val insert : t -> graph -> graph
val update : t -> label -> graph -> graph
val remove : t -> graph -> graph
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list ->
'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi :
(Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list ->
f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array ->
'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t ->
key:Key.t -> data:'a -> 'a list t
val change :
'a t ->
Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t ->
f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t ->
f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key :
'a t -> Key.t -> (Key.t * 'a) option
val next_key :
'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) ->
Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) ->
'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare :
('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find :
t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf :
t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
Elt.t array -> t
val stable_dedup_list :
Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable :
t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) ->
'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one :
('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ ->
data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ ->
key:'a key_ -> data:'b -> unit
val remove_multi :
('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ ->
f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ ->
'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals :
('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr :
?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum ->
f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map :
'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t ->
Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove :
'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b ->
f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
end
val empty : t
val nodes : t -> node seq
val edges : t -> edge seq
val is_directed : bool
val number_of_edges : t -> int
val number_of_nodes : t -> int
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness) Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a | `Right of 'a | `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map : t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable : t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) -> 'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) -> 'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one : ('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set : ('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ -> key:'a key_ -> data:'b -> unit
val remove_multi : ('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ -> f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ -> 'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals : ('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr : ?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum -> f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map : 'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t -> Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove : 'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b -> f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
val to_string : t -> string
val str : unit -> t -> string
val pps : unit -> t -> string
val ppo : out_channel -> t -> unit
val pp_seq :
Format.formatter -> t Core_kernel.Std.Sequence.t -> unit
val pp : Format.formatter -> t -> unit
end
module Int :
sig
type t
type node = node
type edge
module Node :
sig
type t = node
type graph = t
type label = node
type edge = edge
val create : label -> t
val label : t -> label
val mem : t -> graph -> bool
val succs : t -> graph -> t seq
val preds : t -> graph -> t seq
val inputs : t -> graph -> edge seq
val outputs : t -> graph -> edge seq
val degree : ?dir:[ `In | `Out ] -> t -> graph -> int
val insert : t -> graph -> graph
val update : t -> label -> graph -> graph
val remove : t -> graph -> graph
val has_edge : t -> t -> graph -> bool
val edge : t -> t -> graph -> edge option
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list ->
'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi :
(Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list ->
f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array ->
'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t ->
key:Key.t -> data:'a -> 'a list t
val change :
'a t ->
Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t ->
f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t ->
f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key :
'a t -> Key.t -> (Key.t * 'a) option
val next_key :
'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) ->
Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) ->
'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare :
('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find :
t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf :
t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
Elt.t array -> t
val stable_dedup_list :
Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable :
t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) ->
'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one :
('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ ->
data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ ->
key:'a key_ -> data:'b -> unit
val remove_multi :
('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ ->
f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ ->
'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals :
('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr :
?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum ->
f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map :
'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t ->
Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove :
'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b ->
f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
end
module Edge :
sig
type t = edge
type node = node
type graph = t
type label = int
val create : node -> node -> label -> t
val label : t -> label
val src : t -> node
val dst : t -> node
val mem : t -> graph -> bool
val insert : t -> graph -> graph
val update : t -> label -> graph -> graph
val remove : t -> graph -> graph
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list ->
'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi :
(Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list ->
f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array ->
'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t ->
key:Key.t -> data:'a -> 'a list t
val change :
'a t ->
Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t ->
f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t ->
f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key :
'a t -> Key.t -> (Key.t * 'a) option
val next_key :
'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) ->
Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) ->
'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare :
('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find :
t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf :
t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
Elt.t array -> t
val stable_dedup_list :
Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable :
t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) ->
'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one :
('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ ->
data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ ->
key:'a key_ -> data:'b -> unit
val remove_multi :
('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ ->
f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ ->
'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals :
('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr :
?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum ->
f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map :
'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t ->
Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove :
'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b ->
f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
end
val empty : t
val nodes : t -> node seq
val edges : t -> edge seq
val is_directed : bool
val number_of_edges : t -> int
val number_of_nodes : t -> int
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness) Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a | `Right of 'a | `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map : t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable : t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) -> 'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) -> 'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one : ('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set : ('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ -> key:'a key_ -> data:'b -> unit
val remove_multi : ('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ -> f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ -> 'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals : ('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr : ?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum -> f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map : 'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t -> Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove : 'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b -> f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
val to_string : t -> string
val str : unit -> t -> string
val pps : unit -> t -> string
val ppo : out_channel -> t -> unit
val pp_seq :
Format.formatter -> t Core_kernel.Std.Sequence.t -> unit
val pp : Format.formatter -> t -> unit
end
module String :
sig
type t
type node = node
type edge
module Node :
sig
type t = node
type graph = t
type label = node
type edge = edge
val create : label -> t
val label : t -> label
val mem : t -> graph -> bool
val succs : t -> graph -> t seq
val preds : t -> graph -> t seq
val inputs : t -> graph -> edge seq
val outputs : t -> graph -> edge seq
val degree : ?dir:[ `In | `Out ] -> t -> graph -> int
val insert : t -> graph -> graph
val update : t -> label -> graph -> graph
val remove : t -> graph -> graph
val has_edge : t -> t -> graph -> bool
val edge : t -> t -> graph -> edge option
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list ->
'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi :
(Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list ->
f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array ->
'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t ->
key:Key.t -> data:'a -> 'a list t
val change :
'a t ->
Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t ->
f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t ->
f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key :
'a t -> Key.t -> (Key.t * 'a) option
val next_key :
'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) ->
Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) ->
'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare :
('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find :
t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf :
t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
Elt.t array -> t
val stable_dedup_list :
Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable :
t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) ->
'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one :
('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ ->
data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ ->
key:'a key_ -> data:'b -> unit
val remove_multi :
('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ ->
f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ ->
'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals :
('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr :
?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum ->
f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map :
'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t ->
Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove :
'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b ->
f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
end
module Edge :
sig
type t = edge
type node = node
type graph = t
type label = string
val create : node -> node -> label -> t
val label : t -> label
val src : t -> node
val dst : t -> node
val mem : t -> graph -> bool
val insert : t -> graph -> graph
val update : t -> label -> graph -> graph
val remove : t -> graph -> graph
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list ->
'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi :
(Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list ->
f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array ->
'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t ->
key:Key.t -> data:'a -> 'a list t
val change :
'a t ->
Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t ->
f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t ->
f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key :
'a t -> Key.t -> (Key.t * 'a) option
val next_key :
'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) ->
Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) ->
'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare :
('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find :
t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf :
t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
Elt.t array -> t
val stable_dedup_list :
Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable :
t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) ->
'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one :
('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ ->
data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ ->
key:'a key_ -> data:'b -> unit
val remove_multi :
('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ ->
f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ ->
'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals :
('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr :
?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum ->
f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map :
'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t ->
Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove :
'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b ->
f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
end
val empty : t
val nodes : t -> node seq
val edges : t -> edge seq
val is_directed : bool
val number_of_edges : t -> int
val number_of_nodes : t -> int
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness) Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a | `Right of 'a | `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map : t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable : t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) -> 'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) -> 'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one : ('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set : ('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ -> key:'a key_ -> data:'b -> unit
val remove_multi : ('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ -> f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ -> 'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals : ('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr : ?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum -> f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map : 'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t -> Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove : 'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b -> f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
val to_string : t -> string
val str : unit -> t -> string
val pps : unit -> t -> string
val ppo : out_channel -> t -> unit
val pp_seq :
Format.formatter -> t Core_kernel.Std.Sequence.t -> unit
val pp : Format.formatter -> t -> unit
end
module Exp :
sig
type t
type node = node
type edge
module Node :
sig
type t = node
type graph = t
type label = node
type edge = edge
val create : label -> t
val label : t -> label
val mem : t -> graph -> bool
val succs : t -> graph -> t seq
val preds : t -> graph -> t seq
val inputs : t -> graph -> edge seq
val outputs : t -> graph -> edge seq
val degree : ?dir:[ `In | `Out ] -> t -> graph -> int
val insert : t -> graph -> graph
val update : t -> label -> graph -> graph
val remove : t -> graph -> graph
val has_edge : t -> t -> graph -> bool
val edge : t -> t -> graph -> edge option
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list ->
'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi :
(Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list ->
f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array ->
'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t ->
key:Key.t -> data:'a -> 'a list t
val change :
'a t ->
Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t ->
f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t ->
f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key :
'a t -> Key.t -> (Key.t * 'a) option
val next_key :
'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) ->
Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) ->
'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare :
('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find :
t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf :
t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
Elt.t array -> t
val stable_dedup_list :
Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable :
t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) ->
'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one :
('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ ->
data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ ->
key:'a key_ -> data:'b -> unit
val remove_multi :
('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ ->
f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ ->
'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals :
('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr :
?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum ->
f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map :
'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t ->
Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove :
'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b ->
f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
end
module Edge :
sig
type t = edge
type node = node
type graph = t
type label = exp
val create : node -> node -> label -> t
val label : t -> label
val src : t -> node
val dst : t -> node
val mem : t -> graph -> bool
val insert : t -> graph -> graph
val update : t -> label -> graph -> graph
val remove : t -> graph -> graph
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list ->
'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi :
(Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list ->
f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array ->
'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t ->
key:Key.t -> data:'a -> 'a list t
val change :
'a t ->
Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t ->
f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t ->
f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key :
'a t -> Key.t -> (Key.t * 'a) option
val next_key :
'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) ->
Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) ->
'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare :
('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find :
t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf :
t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
Elt.t array -> t
val stable_dedup_list :
Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable :
t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) ->
'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one :
('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ ->
data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ ->
key:'a key_ -> data:'b -> unit
val remove_multi :
('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ ->
f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ ->
'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals :
('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr :
?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum ->
f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map :
'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t ->
Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove :
'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b ->
f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
end
val empty : t
val nodes : t -> node seq
val edges : t -> edge seq
val is_directed : bool
val number_of_edges : t -> int
val number_of_nodes : t -> int
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness) Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a | `Right of 'a | `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map : t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable : t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) -> 'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) -> 'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one : ('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set : ('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ -> key:'a key_ -> data:'b -> unit
val remove_multi : ('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ -> f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ -> 'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals : ('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr : ?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum -> f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map : 'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t -> Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove : 'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b -> f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
val to_string : t -> string
val str : unit -> t -> string
val pps : unit -> t -> string
val ppo : out_channel -> t -> unit
val pp_seq :
Format.formatter -> t Core_kernel.Std.Sequence.t -> unit
val pp : Format.formatter -> t -> unit
end
module Stmt :
sig
type t
type node = node
type edge
module Node :
sig
type t = node
type graph = t
type label = node
type edge = edge
val create : label -> t
val label : t -> label
val mem : t -> graph -> bool
val succs : t -> graph -> t seq
val preds : t -> graph -> t seq
val inputs : t -> graph -> edge seq
val outputs : t -> graph -> edge seq
val degree : ?dir:[ `In | `Out ] -> t -> graph -> int
val insert : t -> graph -> graph
val update : t -> label -> graph -> graph
val remove : t -> graph -> graph
val has_edge : t -> t -> graph -> bool
val edge : t -> t -> graph -> edge option
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list ->
'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi :
(Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list ->
f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array ->
'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t ->
key:Key.t -> data:'a -> 'a list t
val change :
'a t ->
Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t ->
f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t ->
f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key :
'a t -> Key.t -> (Key.t * 'a) option
val next_key :
'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) ->
Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) ->
'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare :
('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find :
t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf :
t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
Elt.t array -> t
val stable_dedup_list :
Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable :
t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) ->
'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one :
('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ ->
data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ ->
key:'a key_ -> data:'b -> unit
val remove_multi :
('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ ->
f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ ->
'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals :
('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr :
?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum ->
f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map :
'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t ->
Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove :
'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b ->
f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
end
module Edge :
sig
type t = edge
type node = node
type graph = t
type label = stmt
val create : node -> node -> label -> t
val label : t -> label
val src : t -> node
val dst : t -> node
val mem : t -> graph -> bool
val insert : t -> graph -> graph
val update : t -> label -> graph -> graph
val remove : t -> graph -> graph
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list ->
'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi :
(Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list ->
f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array ->
'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t ->
key:Key.t -> data:'a -> 'a list t
val change :
'a t ->
Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t ->
f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t ->
f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key :
'a t -> Key.t -> (Key.t * 'a) option
val next_key :
'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) ->
Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) ->
'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare :
('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find :
t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf :
t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
Elt.t array -> t
val stable_dedup_list :
Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable :
t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) ->
'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one :
('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ ->
data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ ->
key:'a key_ -> data:'b -> unit
val remove_multi :
('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ ->
f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ ->
'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals :
('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr :
?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum ->
f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map :
'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t ->
Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove :
'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b ->
f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
end
val empty : t
val nodes : t -> node seq
val edges : t -> edge seq
val is_directed : bool
val number_of_edges : t -> int
val number_of_nodes : t -> int
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness) Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a | `Right of 'a | `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map : t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable : t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) -> 'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) -> 'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one : ('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set : ('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ -> key:'a key_ -> data:'b -> unit
val remove_multi : ('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ -> f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ -> 'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals : ('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr : ?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum -> f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map : 'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t -> Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove : 'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b -> f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
val to_string : t -> string
val str : unit -> t -> string
val pps : unit -> t -> string
val ppo : out_channel -> t -> unit
val pp_seq :
Format.formatter -> t Core_kernel.Std.Sequence.t -> unit
val pp : Format.formatter -> t -> unit
end
module Var :
sig
type t
type node = node
type edge
module Node :
sig
type t = node
type graph = t
type label = node
type edge = edge
val create : label -> t
val label : t -> label
val mem : t -> graph -> bool
val succs : t -> graph -> t seq
val preds : t -> graph -> t seq
val inputs : t -> graph -> edge seq
val outputs : t -> graph -> edge seq
val degree : ?dir:[ `In | `Out ] -> t -> graph -> int
val insert : t -> graph -> graph
val update : t -> label -> graph -> graph
val remove : t -> graph -> graph
val has_edge : t -> t -> graph -> bool
val edge : t -> t -> graph -> edge option
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list ->
'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi :
(Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list ->
f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array ->
'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t ->
key:Key.t -> data:'a -> 'a list t
val change :
'a t ->
Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t ->
f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t ->
f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key :
'a t -> Key.t -> (Key.t * 'a) option
val next_key :
'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) ->
Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) ->
'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare :
('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find :
t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf :
t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
Elt.t array -> t
val stable_dedup_list :
Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable :
t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) ->
'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one :
('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ ->
data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ ->
key:'a key_ -> data:'b -> unit
val remove_multi :
('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ ->
f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ ->
'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals :
('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr :
?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum ->
f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map :
'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t ->
Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove :
'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b ->
f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
end
module Edge :
sig
type t = edge
type node = node
type graph = t
type label = var
val create : node -> node -> label -> t
val label : t -> label
val src : t -> node
val dst : t -> node
val mem : t -> graph -> bool
val insert : t -> graph -> graph
val update : t -> label -> graph -> graph
val remove : t -> graph -> graph
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list ->
'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi :
(Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list ->
f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array ->
'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t ->
key:Key.t -> data:'a -> 'a list t
val change :
'a t ->
Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t ->
f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t ->
f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key :
'a t -> Key.t -> (Key.t * 'a) option
val next_key :
'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) ->
Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) ->
'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare :
('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find :
t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf :
t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
Elt.t array -> t
val stable_dedup_list :
Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable :
t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) ->
'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one :
('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ ->
data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ ->
key:'a key_ -> data:'b -> unit
val remove_multi :
('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ ->
f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ ->
'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals :
('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr :
?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum ->
f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map :
'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t ->
Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove :
'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b ->
f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
end
val empty : t
val nodes : t -> node seq
val edges : t -> edge seq
val is_directed : bool
val number_of_edges : t -> int
val number_of_nodes : t -> int
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness) Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a | `Right of 'a | `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map : t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable : t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) -> 'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) -> 'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one : ('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set : ('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ -> key:'a key_ -> data:'b -> unit
val remove_multi : ('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ -> f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ -> 'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals : ('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr : ?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum -> f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map : 'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t -> Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove : 'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b -> f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
val to_string : t -> string
val str : unit -> t -> string
val pps : unit -> t -> string
val ppo : out_channel -> t -> unit
val pp_seq :
Format.formatter -> t Core_kernel.Std.Sequence.t -> unit
val pp : Format.formatter -> t -> unit
end
module Tid :
sig
type t
type node = node
type edge
module Node :
sig
type t = node
type graph = t
type label = node
type edge = edge
val create : label -> t
val label : t -> label
val mem : t -> graph -> bool
val succs : t -> graph -> t seq
val preds : t -> graph -> t seq
val inputs : t -> graph -> edge seq
val outputs : t -> graph -> edge seq
val degree : ?dir:[ `In | `Out ] -> t -> graph -> int
val insert : t -> graph -> graph
val update : t -> label -> graph -> graph
val remove : t -> graph -> graph
val has_edge : t -> t -> graph -> bool
val edge : t -> t -> graph -> edge option
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list ->
'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi :
(Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list ->
f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array ->
'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t ->
key:Key.t -> data:'a -> 'a list t
val change :
'a t ->
Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t ->
f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t ->
f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key :
'a t -> Key.t -> (Key.t * 'a) option
val next_key :
'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) ->
Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) ->
'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare :
('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find :
t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf :
t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
Elt.t array -> t
val stable_dedup_list :
Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable :
t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) ->
'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one :
('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ ->
data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ ->
key:'a key_ -> data:'b -> unit
val remove_multi :
('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ ->
f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ ->
'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals :
('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr :
?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum ->
f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map :
'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t ->
Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove :
'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b ->
f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
end
module Edge :
sig
type t = edge
type node = node
type graph = t
type label = tid
val create : node -> node -> label -> t
val label : t -> label
val src : t -> node
val dst : t -> node
val mem : t -> graph -> bool
val insert : t -> graph -> graph
val update : t -> label -> graph -> graph
val remove : t -> graph -> graph
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list ->
'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi :
(Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list ->
f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array ->
'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t ->
key:Key.t -> data:'a -> 'a list t
val change :
'a t ->
Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t ->
f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t ->
f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key :
'a t -> Key.t -> (Key.t * 'a) option
val next_key :
'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) ->
Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) ->
'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare :
('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find :
t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf :
t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
Elt.t array -> t
val stable_dedup_list :
Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable :
t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) ->
'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one :
('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ ->
data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ ->
key:'a key_ -> data:'b -> unit
val remove_multi :
('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ ->
f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ ->
'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals :
('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr :
?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum ->
f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map :
'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t ->
Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove :
'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b ->
f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
end
val empty : t
val nodes : t -> node seq
val edges : t -> edge seq
val is_directed : bool
val number_of_edges : t -> int
val number_of_nodes : t -> int
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness) Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a | `Right of 'a | `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map : t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable : t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) -> 'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) -> 'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one : ('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set : ('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ -> key:'a key_ -> data:'b -> unit
val remove_multi : ('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ -> f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ -> 'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals : ('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr : ?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum -> f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map : 'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t -> Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove : 'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b -> f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
val to_string : t -> string
val str : unit -> t -> string
val pps : unit -> t -> string
val ppo : out_channel -> t -> unit
val pp_seq :
Format.formatter -> t Core_kernel.Std.Sequence.t -> unit
val pp : Format.formatter -> t -> unit
end
module Type :
sig
type t
type node = node
type edge
module Node :
sig
type t = node
type graph = t
type label = node
type edge = edge
val create : label -> t
val label : t -> label
val mem : t -> graph -> bool
val succs : t -> graph -> t seq
val preds : t -> graph -> t seq
val inputs : t -> graph -> edge seq
val outputs : t -> graph -> edge seq
val degree : ?dir:[ `In | `Out ] -> t -> graph -> int
val insert : t -> graph -> graph
val update : t -> label -> graph -> graph
val remove : t -> graph -> graph
val has_edge : t -> t -> graph -> bool
val edge : t -> t -> graph -> edge option
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list ->
'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi :
(Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list ->
f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array ->
'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t ->
key:Key.t -> data:'a -> 'a list t
val change :
'a t ->
Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t ->
f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t ->
f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key :
'a t -> Key.t -> (Key.t * 'a) option
val next_key :
'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) ->
Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) ->
'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare :
('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find :
t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf :
t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
Elt.t array -> t
val stable_dedup_list :
Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable :
t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) ->
'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one :
('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ ->
data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ ->
key:'a key_ -> data:'b -> unit
val remove_multi :
('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ ->
f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ ->
'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals :
('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr :
?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum ->
f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map :
'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t ->
Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove :
'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b ->
f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
end
module Edge :
sig
type t = edge
type node = node
type graph = t
type label = typ
val create : node -> node -> label -> t
val label : t -> label
val src : t -> node
val dst : t -> node
val mem : t -> graph -> bool
val insert : t -> graph -> graph
val update : t -> label -> graph -> graph
val remove : t -> graph -> graph
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list ->
'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi :
(Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list ->
f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array ->
'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t ->
key:Key.t -> data:'a -> 'a list t
val change :
'a t ->
Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t ->
f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t ->
f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key :
'a t -> Key.t -> (Key.t * 'a) option
val next_key :
'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) ->
Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) ->
'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare :
('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find :
t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf :
t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
Elt.t array -> t
val stable_dedup_list :
Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable :
t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) ->
'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one :
('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ ->
data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ ->
key:'a key_ -> data:'b -> unit
val remove_multi :
('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ ->
f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ ->
'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals :
('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr :
?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum ->
f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map :
'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t ->
Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove :
'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b ->
f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
end
val empty : t
val nodes : t -> node seq
val edges : t -> edge seq
val is_directed : bool
val number_of_edges : t -> int
val number_of_nodes : t -> int
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness) Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a | `Right of 'a | `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map : t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable : t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) -> 'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) -> 'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one : ('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set : ('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ -> key:'a key_ -> data:'b -> unit
val remove_multi : ('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ -> f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ -> 'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals : ('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr : ?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum -> f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map : 'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t -> Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove : 'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b -> f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
val to_string : t -> string
val str : unit -> t -> string
val pps : unit -> t -> string
val ppo : out_channel -> t -> unit
val pp_seq :
Format.formatter -> t Core_kernel.Std.Sequence.t -> unit
val pp : Format.formatter -> t -> unit
end
module Tree :
sig
type t = node tree
val to_string : t -> string
val str : unit -> t -> string
val pps : unit -> t -> string
val ppo : out_channel -> t -> unit
val pp_seq :
Format.formatter -> t Core_kernel.Std.Sequence.t -> unit
val pp : Format.formatter -> t -> unit
end
module Frontier :
sig
type t = node frontier
val to_string : t -> string
val str : unit -> t -> string
val pps : unit -> t -> string
val ppo : out_channel -> t -> unit
val pp_seq :
Format.formatter -> t Core_kernel.Std.Sequence.t -> unit
val pp : Format.formatter -> t -> unit
end
module Path :
sig
type t = node path
val to_string : t -> string
val str : unit -> t -> string
val pps : unit -> t -> string
val ppo : out_channel -> t -> unit
val pp_seq :
Format.formatter -> t Core_kernel.Std.Sequence.t -> unit
val pp : Format.formatter -> t -> unit
end
module Partition :
sig
type t = node partition
val to_string : t -> string
val str : unit -> t -> string
val pps : unit -> t -> string
val ppo : out_channel -> t -> unit
val pp_seq :
Format.formatter -> t Core_kernel.Std.Sequence.t -> unit
val pp : Format.formatter -> t -> unit
end
module Group :
sig
type t = node group
val to_string : t -> string
val str : unit -> t -> string
val pps : unit -> t -> string
val ppo : out_channel -> t -> unit
val pp_seq :
Format.formatter -> t Core_kernel.Std.Sequence.t -> unit
val pp : Format.formatter -> t -> unit
end
end
module Var :
sig
type node = var
module Bool :
sig
type t
type node = node
type edge
module Node :
sig
type t = node
type graph = t
type label = node
type edge = edge
val create : label -> t
val label : t -> label
val mem : t -> graph -> bool
val succs : t -> graph -> t seq
val preds : t -> graph -> t seq
val inputs : t -> graph -> edge seq
val outputs : t -> graph -> edge seq
val degree : ?dir:[ `In | `Out ] -> t -> graph -> int
val insert : t -> graph -> graph
val update : t -> label -> graph -> graph
val remove : t -> graph -> graph
val has_edge : t -> t -> graph -> bool
val edge : t -> t -> graph -> edge option
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list ->
'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi :
(Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list ->
f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array ->
'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t ->
key:Key.t -> data:'a -> 'a list t
val change :
'a t ->
Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t ->
f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t ->
f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key :
'a t -> Key.t -> (Key.t * 'a) option
val next_key :
'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) ->
Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) ->
'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare :
('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find :
t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf :
t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
Elt.t array -> t
val stable_dedup_list :
Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable :
t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) ->
'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one :
('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ ->
data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ ->
key:'a key_ -> data:'b -> unit
val remove_multi :
('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ ->
f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ ->
'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals :
('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr :
?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum ->
f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map :
'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t ->
Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove :
'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b ->
f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
end
module Edge :
sig
type t = edge
type node = node
type graph = t
type label = bool
val create : node -> node -> label -> t
val label : t -> label
val src : t -> node
val dst : t -> node
val mem : t -> graph -> bool
val insert : t -> graph -> graph
val update : t -> label -> graph -> graph
val remove : t -> graph -> graph
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list ->
'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi :
(Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list ->
f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array ->
'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t ->
key:Key.t -> data:'a -> 'a list t
val change :
'a t ->
Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t ->
f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t ->
f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key :
'a t -> Key.t -> (Key.t * 'a) option
val next_key :
'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) ->
Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) ->
'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare :
('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find :
t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf :
t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
Elt.t array -> t
val stable_dedup_list :
Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable :
t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) ->
'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one :
('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ ->
data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ ->
key:'a key_ -> data:'b -> unit
val remove_multi :
('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ ->
f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ ->
'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals :
('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr :
?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum ->
f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map :
'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t ->
Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove :
'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b ->
f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
end
val empty : t
val nodes : t -> node seq
val edges : t -> edge seq
val is_directed : bool
val number_of_edges : t -> int
val number_of_nodes : t -> int
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness) Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a | `Right of 'a | `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map : t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable : t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) -> 'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) -> 'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one : ('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set : ('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ -> key:'a key_ -> data:'b -> unit
val remove_multi : ('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ -> f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ -> 'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals : ('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr : ?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum -> f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map : 'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t -> Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove : 'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b -> f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
val to_string : t -> string
val str : unit -> t -> string
val pps : unit -> t -> string
val ppo : out_channel -> t -> unit
val pp_seq :
Format.formatter -> t Core_kernel.Std.Sequence.t -> unit
val pp : Format.formatter -> t -> unit
end
module Unit :
sig
type t
type node = node
type edge
module Node :
sig
type t = node
type graph = t
type label = node
type edge = edge
val create : label -> t
val label : t -> label
val mem : t -> graph -> bool
val succs : t -> graph -> t seq
val preds : t -> graph -> t seq
val inputs : t -> graph -> edge seq
val outputs : t -> graph -> edge seq
val degree : ?dir:[ `In | `Out ] -> t -> graph -> int
val insert : t -> graph -> graph
val update : t -> label -> graph -> graph
val remove : t -> graph -> graph
val has_edge : t -> t -> graph -> bool
val edge : t -> t -> graph -> edge option
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list ->
'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi :
(Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list ->
f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array ->
'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t ->
key:Key.t -> data:'a -> 'a list t
val change :
'a t ->
Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t ->
f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t ->
f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key :
'a t -> Key.t -> (Key.t * 'a) option
val next_key :
'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) ->
Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) ->
'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare :
('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find :
t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf :
t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
Elt.t array -> t
val stable_dedup_list :
Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable :
t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) ->
'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one :
('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ ->
data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ ->
key:'a key_ -> data:'b -> unit
val remove_multi :
('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ ->
f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ ->
'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals :
('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr :
?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum ->
f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map :
'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t ->
Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove :
'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b ->
f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
end
module Edge :
sig
type t = edge
type node = node
type graph = t
type label = unit
val create : node -> node -> label -> t
val label : t -> label
val src : t -> node
val dst : t -> node
val mem : t -> graph -> bool
val insert : t -> graph -> graph
val update : t -> label -> graph -> graph
val remove : t -> graph -> graph
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list ->
'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi :
(Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list ->
f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array ->
'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t ->
key:Key.t -> data:'a -> 'a list t
val change :
'a t ->
Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t ->
f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t ->
f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key :
'a t -> Key.t -> (Key.t * 'a) option
val next_key :
'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) ->
Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) ->
'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare :
('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find :
t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf :
t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
Elt.t array -> t
val stable_dedup_list :
Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable :
t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) ->
'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one :
('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ ->
data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ ->
key:'a key_ -> data:'b -> unit
val remove_multi :
('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ ->
f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ ->
'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals :
('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr :
?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum ->
f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map :
'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t ->
Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove :
'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b ->
f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
end
val empty : t
val nodes : t -> node seq
val edges : t -> edge seq
val is_directed : bool
val number_of_edges : t -> int
val number_of_nodes : t -> int
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness) Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a | `Right of 'a | `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map : t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable : t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) -> 'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) -> 'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one : ('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set : ('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ -> key:'a key_ -> data:'b -> unit
val remove_multi : ('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ -> f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ -> 'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals : ('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr : ?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum -> f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map : 'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t -> Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove : 'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b -> f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
val to_string : t -> string
val str : unit -> t -> string
val pps : unit -> t -> string
val ppo : out_channel -> t -> unit
val pp_seq :
Format.formatter -> t Core_kernel.Std.Sequence.t -> unit
val pp : Format.formatter -> t -> unit
end
module Value :
sig
type t
type node = node
type edge
module Node :
sig
type t = node
type graph = t
type label = node
type edge = edge
val create : label -> t
val label : t -> label
val mem : t -> graph -> bool
val succs : t -> graph -> t seq
val preds : t -> graph -> t seq
val inputs : t -> graph -> edge seq
val outputs : t -> graph -> edge seq
val degree : ?dir:[ `In | `Out ] -> t -> graph -> int
val insert : t -> graph -> graph
val update : t -> label -> graph -> graph
val remove : t -> graph -> graph
val has_edge : t -> t -> graph -> bool
val edge : t -> t -> graph -> edge option
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list ->
'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi :
(Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list ->
f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array ->
'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t ->
key:Key.t -> data:'a -> 'a list t
val change :
'a t ->
Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t ->
f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t ->
f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key :
'a t -> Key.t -> (Key.t * 'a) option
val next_key :
'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) ->
Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) ->
'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare :
('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find :
t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf :
t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
Elt.t array -> t
val stable_dedup_list :
Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable :
t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) ->
'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one :
('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ ->
data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ ->
key:'a key_ -> data:'b -> unit
val remove_multi :
('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ ->
f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ ->
'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals :
('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr :
?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum ->
f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map :
'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t ->
Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove :
'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b ->
f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
end
module Edge :
sig
type t = edge
type node = node
type graph = t
type label = value
val create : node -> node -> label -> t
val label : t -> label
val src : t -> node
val dst : t -> node
val mem : t -> graph -> bool
val insert : t -> graph -> graph
val update : t -> label -> graph -> graph
val remove : t -> graph -> graph
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list ->
'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi :
(Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list ->
f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array ->
'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t ->
key:Key.t -> data:'a -> 'a list t
val change :
'a t ->
Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t ->
f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t ->
f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key :
'a t -> Key.t -> (Key.t * 'a) option
val next_key :
'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) ->
Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) ->
'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare :
('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find :
t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf :
t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
Elt.t array -> t
val stable_dedup_list :
Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable :
t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) ->
'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one :
('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ ->
data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ ->
key:'a key_ -> data:'b -> unit
val remove_multi :
('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ ->
f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ ->
'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals :
('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr :
?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum ->
f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map :
'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t ->
Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove :
'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b ->
f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
end
val empty : t
val nodes : t -> node seq
val edges : t -> edge seq
val is_directed : bool
val number_of_edges : t -> int
val number_of_nodes : t -> int
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness) Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a | `Right of 'a | `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map : t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable : t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) -> 'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) -> 'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one : ('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set : ('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ -> key:'a key_ -> data:'b -> unit
val remove_multi : ('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ -> f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ -> 'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals : ('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr : ?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum -> f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map : 'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t -> Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove : 'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b -> f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
val to_string : t -> string
val str : unit -> t -> string
val pps : unit -> t -> string
val ppo : out_channel -> t -> unit
val pp_seq :
Format.formatter -> t Core_kernel.Std.Sequence.t -> unit
val pp : Format.formatter -> t -> unit
end
module Word :
sig
type t
type node = node
type edge
module Node :
sig
type t = node
type graph = t
type label = node
type edge = edge
val create : label -> t
val label : t -> label
val mem : t -> graph -> bool
val succs : t -> graph -> t seq
val preds : t -> graph -> t seq
val inputs : t -> graph -> edge seq
val outputs : t -> graph -> edge seq
val degree : ?dir:[ `In | `Out ] -> t -> graph -> int
val insert : t -> graph -> graph
val update : t -> label -> graph -> graph
val remove : t -> graph -> graph
val has_edge : t -> t -> graph -> bool
val edge : t -> t -> graph -> edge option
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list ->
'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi :
(Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list ->
f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array ->
'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t ->
key:Key.t -> data:'a -> 'a list t
val change :
'a t ->
Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t ->
f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t ->
f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key :
'a t -> Key.t -> (Key.t * 'a) option
val next_key :
'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) ->
Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) ->
'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare :
('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find :
t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf :
t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
Elt.t array -> t
val stable_dedup_list :
Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable :
t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) ->
'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one :
('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ ->
data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ ->
key:'a key_ -> data:'b -> unit
val remove_multi :
('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ ->
f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ ->
'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals :
('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr :
?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum ->
f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map :
'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t ->
Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove :
'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b ->
f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
end
module Edge :
sig
type t = edge
type node = node
type graph = t
type label = word
val create : node -> node -> label -> t
val label : t -> label
val src : t -> node
val dst : t -> node
val mem : t -> graph -> bool
val insert : t -> graph -> graph
val update : t -> label -> graph -> graph
val remove : t -> graph -> graph
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list ->
'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi :
(Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list ->
f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array ->
'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t ->
key:Key.t -> data:'a -> 'a list t
val change :
'a t ->
Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t ->
f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t ->
f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key :
'a t -> Key.t -> (Key.t * 'a) option
val next_key :
'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) ->
Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) ->
'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare :
('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find :
t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf :
t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
Elt.t array -> t
val stable_dedup_list :
Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable :
t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) ->
'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one :
('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ ->
data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ ->
key:'a key_ -> data:'b -> unit
val remove_multi :
('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ ->
f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ ->
'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals :
('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr :
?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum ->
f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map :
'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t ->
Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove :
'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b ->
f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
end
val empty : t
val nodes : t -> node seq
val edges : t -> edge seq
val is_directed : bool
val number_of_edges : t -> int
val number_of_nodes : t -> int
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness) Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a | `Right of 'a | `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map : t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable : t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) -> 'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) -> 'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one : ('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set : ('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ -> key:'a key_ -> data:'b -> unit
val remove_multi : ('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ -> f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ -> 'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals : ('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr : ?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum -> f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map : 'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t -> Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove : 'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b -> f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
val to_string : t -> string
val str : unit -> t -> string
val pps : unit -> t -> string
val ppo : out_channel -> t -> unit
val pp_seq :
Format.formatter -> t Core_kernel.Std.Sequence.t -> unit
val pp : Format.formatter -> t -> unit
end
module Int :
sig
type t
type node = node
type edge
module Node :
sig
type t = node
type graph = t
type label = node
type edge = edge
val create : label -> t
val label : t -> label
val mem : t -> graph -> bool
val succs : t -> graph -> t seq
val preds : t -> graph -> t seq
val inputs : t -> graph -> edge seq
val outputs : t -> graph -> edge seq
val degree : ?dir:[ `In | `Out ] -> t -> graph -> int
val insert : t -> graph -> graph
val update : t -> label -> graph -> graph
val remove : t -> graph -> graph
val has_edge : t -> t -> graph -> bool
val edge : t -> t -> graph -> edge option
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list ->
'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi :
(Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list ->
f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array ->
'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t ->
key:Key.t -> data:'a -> 'a list t
val change :
'a t ->
Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t ->
f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t ->
f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key :
'a t -> Key.t -> (Key.t * 'a) option
val next_key :
'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) ->
Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) ->
'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare :
('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find :
t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf :
t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
Elt.t array -> t
val stable_dedup_list :
Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable :
t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) ->
'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one :
('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ ->
data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ ->
key:'a key_ -> data:'b -> unit
val remove_multi :
('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ ->
f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ ->
'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals :
('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr :
?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum ->
f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map :
'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t ->
Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove :
'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b ->
f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
end
module Edge :
sig
type t = edge
type node = node
type graph = t
type label = int
val create : node -> node -> label -> t
val label : t -> label
val src : t -> node
val dst : t -> node
val mem : t -> graph -> bool
val insert : t -> graph -> graph
val update : t -> label -> graph -> graph
val remove : t -> graph -> graph
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list ->
'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi :
(Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list ->
f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array ->
'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t ->
key:Key.t -> data:'a -> 'a list t
val change :
'a t ->
Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t ->
f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t ->
f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key :
'a t -> Key.t -> (Key.t * 'a) option
val next_key :
'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) ->
Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) ->
'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare :
('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find :
t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf :
t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
Elt.t array -> t
val stable_dedup_list :
Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable :
t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) ->
'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one :
('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ ->
data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ ->
key:'a key_ -> data:'b -> unit
val remove_multi :
('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ ->
f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ ->
'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals :
('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr :
?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum ->
f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map :
'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t ->
Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove :
'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b ->
f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
end
val empty : t
val nodes : t -> node seq
val edges : t -> edge seq
val is_directed : bool
val number_of_edges : t -> int
val number_of_nodes : t -> int
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness) Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a | `Right of 'a | `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map : t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable : t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) -> 'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) -> 'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one : ('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set : ('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ -> key:'a key_ -> data:'b -> unit
val remove_multi : ('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ -> f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ -> 'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals : ('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr : ?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum -> f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map : 'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t -> Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove : 'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b -> f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
val to_string : t -> string
val str : unit -> t -> string
val pps : unit -> t -> string
val ppo : out_channel -> t -> unit
val pp_seq :
Format.formatter -> t Core_kernel.Std.Sequence.t -> unit
val pp : Format.formatter -> t -> unit
end
module String :
sig
type t
type node = node
type edge
module Node :
sig
type t = node
type graph = t
type label = node
type edge = edge
val create : label -> t
val label : t -> label
val mem : t -> graph -> bool
val succs : t -> graph -> t seq
val preds : t -> graph -> t seq
val inputs : t -> graph -> edge seq
val outputs : t -> graph -> edge seq
val degree : ?dir:[ `In | `Out ] -> t -> graph -> int
val insert : t -> graph -> graph
val update : t -> label -> graph -> graph
val remove : t -> graph -> graph
val has_edge : t -> t -> graph -> bool
val edge : t -> t -> graph -> edge option
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list ->
'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi :
(Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list ->
f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array ->
'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t ->
key:Key.t -> data:'a -> 'a list t
val change :
'a t ->
Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t ->
f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t ->
f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key :
'a t -> Key.t -> (Key.t * 'a) option
val next_key :
'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) ->
Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) ->
'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare :
('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find :
t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf :
t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
Elt.t array -> t
val stable_dedup_list :
Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable :
t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) ->
'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one :
('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ ->
data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ ->
key:'a key_ -> data:'b -> unit
val remove_multi :
('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ ->
f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ ->
'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals :
('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr :
?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum ->
f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map :
'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t ->
Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove :
'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b ->
f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
end
module Edge :
sig
type t = edge
type node = node
type graph = t
type label = string
val create : node -> node -> label -> t
val label : t -> label
val src : t -> node
val dst : t -> node
val mem : t -> graph -> bool
val insert : t -> graph -> graph
val update : t -> label -> graph -> graph
val remove : t -> graph -> graph
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list ->
'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi :
(Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list ->
f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array ->
'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t ->
key:Key.t -> data:'a -> 'a list t
val change :
'a t ->
Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t ->
f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t ->
f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key :
'a t -> Key.t -> (Key.t * 'a) option
val next_key :
'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) ->
Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) ->
'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare :
('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find :
t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf :
t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
Elt.t array -> t
val stable_dedup_list :
Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable :
t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) ->
'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one :
('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ ->
data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ ->
key:'a key_ -> data:'b -> unit
val remove_multi :
('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ ->
f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ ->
'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals :
('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr :
?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum ->
f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map :
'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t ->
Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove :
'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b ->
f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
end
val empty : t
val nodes : t -> node seq
val edges : t -> edge seq
val is_directed : bool
val number_of_edges : t -> int
val number_of_nodes : t -> int
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness) Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a | `Right of 'a | `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map : t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable : t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) -> 'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) -> 'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one : ('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set : ('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ -> key:'a key_ -> data:'b -> unit
val remove_multi : ('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ -> f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ -> 'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals : ('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr : ?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum -> f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map : 'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt :
'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t -> Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove : 'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace :
'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b -> f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
val to_string : t -> string
val str : unit -> t -> string
val pps : unit -> t -> string
val ppo : out_channel -> t -> unit
val pp_seq :
Format.formatter -> t Core_kernel.Std.Sequence.t -> unit
val pp : Format.formatter -> t -> unit
end
module Exp :
sig
type t
type node = node
type edge
module Node :
sig
type t = node
type graph = t
type label = node
type edge = edge
val create : label -> t
val label : t -> label
val mem : t -> graph -> bool
val succs : t -> graph -> t seq
val preds : t -> graph -> t seq
val inputs : t -> graph -> edge seq
val outputs : t -> graph -> edge seq
val degree : ?dir:[ `In | `Out ] -> t -> graph -> int
val insert : t -> graph -> graph
val update : t -> label -> graph -> graph
val remove : t -> graph -> graph
val has_edge : t -> t -> graph -> bool
val edge : t -> t -> graph -> edge option
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Comparable_intf.bound ->
max:t Core_kernel.Comparable_intf.bound ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list ->
'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi :
(Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list ->
f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array ->
'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t ->
key:Key.t -> data:'a -> 'a list t
val change :
'a t ->
Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t ->
f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t ->
f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key :
'a t -> Key.t -> (Key.t * 'a) option
val next_key :
'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) ->
Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) ->
'a t -> Sexplib.Sexp.t
end
type 'a t =
(Key.t, 'a, Key.comparator_witness)
Core_kernel.Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val change :
'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map :
'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t *
[ `Left of 'a
| `Right of 'a
| `Unequal of 'a * 'a ])
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b ->
f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t ->
min:Key.t -> max:Key.t -> (Key.t * 'a) list
val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
val next_key : 'a t -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?keys_in:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Key.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Key.t ] ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare :
('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find :
t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf :
t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
Elt.t array -> t
val stable_dedup_list :
Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t =
(Elt.t, Elt.comparator_witness)
Core_kernel.Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map :
t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b ->
Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * bool * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?in_:[ `Decreasing_order
| `Decreasing_order_less_than_or_equal_to of
Elt.t
| `Increasing_order
| `Increasing_order_greater_than_or_equal_to of
Elt.t ] ->
t -> Elt.t Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
val hash : t -> int
val compare : t -> t -> int
val hashable :
t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val create :
('a key_, 'b, unit -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_key of 'a key_ | `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
('a key_, 'b,
('a key_ * 'b) list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
('a key_, 'b,
('a key_ * 'b) list ->
('a, 'b) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
('a key_, 'b, ('a key_ * 'b) list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
('a key_, 'b list,
('a key_ * 'b) list -> ('a, 'b list) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'b) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list ->
[ `Duplicate_keys of 'a key_ list
| `Ok of ('a, 'r) t_ ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_ Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
('a key_, 'r,
get_key:('r -> 'a key_) ->
'r list -> ('a, 'r) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
('a key_, 'b,
get_key:('r -> 'a key_) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) ->
'r list -> ('a, 'b) t_)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key :
('a, 'b) t_ -> 'a key_ -> Sexplib.Sexp.t
val clear : ('a, 'b) t_ -> unit
val copy : ('a, 'b) t_ -> ('a, 'b) t_
val invariant : ('a, 'b) t_ -> unit
val fold :
('a, 'b) t_ ->
init:'c ->
f:(key:'a key_ -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> unit) -> unit
val existsi :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val exists : ('a, 'b) t_ -> f:('b -> bool) -> bool
val for_alli :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> bool
val for_all : ('a, 'b) t_ -> f:('b -> bool) -> bool
val length : ('a, 'b) t_ -> int
val is_empty : ('a, 'b) t_ -> bool
val mem : ('a, 'b) t_ -> 'a key_ -> bool
val remove : ('a, 'b) t_ -> 'a key_ -> unit
val remove_one :
('a, 'b list) t_ -> 'a key_ -> unit
val replace :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val set :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val add :
('a, 'b) t_ ->
key:'a key_ -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
('a, 'b) t_ ->
key:'a key_ ->
data:'b -> unit Core_kernel.Or_error.t
val add_exn :
('a, 'b) t_ -> key:'a key_ -> data:'b -> unit
val change :
('a, 'b) t_ ->
'a key_ -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) t_ ->
key:'a key_ -> data:'b -> unit
val remove_multi :
('a, 'b list) t_ -> 'a key_ -> unit
val map :
('c, ('a, 'b) t_ -> f:('b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c,
('a, 'b) t_ ->
f:('b -> 'c option) -> ('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> 'c option) ->
('a, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter :
('a, 'b) t_ -> f:('b -> bool) -> ('a, 'b) t_
val filteri :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) -> ('a, 'b) t_
val partition_map :
('c,
('d,
('a, 'b) t_ ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
('a, 'b) t_ ->
f:(key:'a key_ ->
data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
('a, 'c) t_ * ('a, 'd) t_)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf :
('a, 'b) t_ ->
f:('b -> bool) -> ('a, 'b) t_ * ('a, 'b) t_
val partitioni_tf :
('a, 'b) t_ ->
f:(key:'a key_ -> data:'b -> bool) ->
('a, 'b) t_ * ('a, 'b) t_
val find_or_add :
('a, 'b) t_ ->
'a key_ -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) t_ -> 'a key_ -> 'b option
val find_exn : ('a, 'b) t_ -> 'a key_ -> 'b
val find_and_call :
('a, 'b) t_ ->
'a key_ ->
if_found:('b -> 'c) ->
if_not_found:('a key_ -> 'c) -> 'c
val find_and_remove :
('a, 'b) t_ -> 'a key_ -> 'b option
val iter_vals :
('a, 'b) t_ -> f:('b -> unit) -> unit
val merge :
('c,
('k, 'a) t_ ->
('k, 'b) t_ ->
f:(key:'k key_ ->
[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] -> 'c option) ->
('k, 'c) t_)
Core_kernel.Core_hashtbl_intf.no_map_options
val merge_into :
f:(key:'a key_ -> 'b -> 'c option -> 'c option) ->
src:('a, 'b) t_ -> dst:('a, 'c) t_ -> unit
val keys : ('a, 'b) t_ -> 'a key_ list
val data : ('a, 'b) t_ -> 'b list
val filter_inplace :
('a, 'b) t_ -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) t_ -> f:('a key_ -> 'b -> bool) -> unit
val equal :
('a, 'b) t_ ->
('a, 'b) t_ -> ('b -> 'b -> bool) -> bool
val similar :
('a, 'b1) t_ ->
('a, 'b2) t_ -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : ('a, 'b) t_ -> ('a key_ * 'b) list
val validate :
name:('a key_ -> string) ->
'b Core_kernel.Validate.check ->
('a, 'b) t_ Core_kernel.Validate.check
val incr :
?by:int -> ('a, int) t_ -> 'a key_ -> unit
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, 'a elt_ list -> 'a t_)
Core_kernel.Hash_set_intf.create_options_without_hashable
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Hash_queue :
sig
module Key :
sig
type t = t
val hash : t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a